Commit Graph

124 Commits

Author SHA1 Message Date
Wojtek Figat
92254eefcc SImplify some code and update code for platforms 2025-11-25 00:20:14 -08:00
Wojtek Figat
053e52c91f Fix compilation for bindings only without scripting internal host defined 2025-10-29 22:18:01 +01:00
Wojtek Figat
32f2ef3f06 Fix Android compilation 2025-09-30 18:26:10 +02:00
Wojtek Figat
1f56c75821 Minor fixes 2025-09-09 15:26:03 +02:00
Wojtek Figat
64e127a47a Fix crashes of scripting backend on Android 2025-09-09 15:25:24 +02:00
Wojtek Figat
cfd2f42b0c Optimize managed memory allocations in Editor profiler 2025-06-09 22:06:49 +02:00
Wojtek Figat
d7ff9fdade Optimize editor profiler native allocations when capturing data 2025-06-09 15:23:31 +02:00
Wojtek Figat
9c3fd052cd Remove copyright year from source files and update to 2025 2025-04-07 19:22:21 +02:00
b095acd4a5 Fix scripting AssemblyLoadContext not getting unloaded 2025-02-26 20:29:19 +02:00
Wojtek Figat
5a873ad606 Fix crash when boxing native non-POD structure into managed data 2024-10-25 13:25:47 +02:00
Wojtek Figat
e860f969be Add attributes support for dotnet interop for methods, fields and properties 2024-10-04 15:59:34 +02:00
d56493da54 Use UnsafeAccessor to initialize scripting object interop fields 2024-06-30 15:52:14 +03:00
bf5e5d1254 Refactor native interop internal type lookup 2024-06-01 23:20:33 +03:00
adbe43c2c2 Move generated marshallers into separate namespace
Avoid polluting the `FlaxEngine` namespace with interop related
marshallers, move those to nested namespace called `Interop` where most
of the common marshallers are placed already.
2024-06-01 23:20:32 +03:00
b6879e7688 Fix concurrent access to cached marshalled type sizes
Also optimize hot path for type size when we have generic type
2024-03-03 01:32:52 +02:00
Wojtek Figat
859c420d76 Update year in copyright note 2024-02-26 19:00:48 +01:00
Wojtek Figat
8898c20ad1 Fix crash when using generic interface in C#
#1983
2024-02-25 23:40:14 +01:00
Wojtek Figat
2df3d0f747 Fix crash when loading level with abstract script class
#1990
2024-02-25 14:54:57 +01:00
Wojtek Figat
f0f8da3c09 Various fixes 2024-02-16 12:29:59 +01:00
Wojtek Figat
7db0ae59bb Fix managed method delegate creation to be thread-safe 2023-12-07 14:35:13 +01:00
Wojtek Figat
cebd28c3a7 Revert fd938e8284 2023-11-29 18:46:18 +01:00
Wojtek Figat
d3a77c7a55 Fix regressions 2023-11-28 17:38:06 +01:00
Wojtek Figat
fd938e8284 Fix incorrect pointer marshalling from Variant to managed runtime
#1992
2023-11-28 11:22:14 +01:00
Wojtek Figat
39dc5939e3 Fix crash when boxing native non-POD structure into managed format
#1992
2023-11-27 17:08:07 +01:00
Wojtek Figat
0f14672e3b Codestyle formatting and fixes for #1888 2023-11-13 09:45:33 +01:00
SS
77b6a4a68b Fixed issue in NativeInterop
Readded check in current app domain to ExtendedSerializationBinder
2023-11-07 16:03:03 -07:00
SS
d6e93a7fab Fixed issue involving stale scripting assemblies in FlaxEngine.Json dynamic type resolution
Added new ExtendedSerializationBinder
Added callback to clear serializer cache on scripting assembly reload
Added low-cost mechanism to invalidate the SerializerCache after domain reload
2023-11-06 18:49:30 -07:00
Wojtek Figat
bfaa292b04 Fix invoking managed method on value types (eg. Transform) to properly handle instance value
#1801
2023-10-26 11:37:37 +02:00
Wojtek Figat
af468ee6ae Fix scripting interop in AOT mode to use reflection-based field access 2023-10-11 15:18:28 +02:00
Wojtek Figat
ac542bf920 Fix FieldHelper.GetFieldOffset crash for classes with const fields (compile-time)
Inline call in `CreateScriptingObject` for perf
2023-10-10 20:52:12 +02:00
Wojtek Figat
18aafb6fc7 Fix regression from #1312 when passing structure from C++ to C# thunk as already boxed value 2023-10-05 11:35:52 +02:00
Wojtek Figat
f77198c7ca Fixes for iOS #1312 2023-09-29 00:00:21 +02:00
Wojtek Figat
82b2f46b48 Post-merge tweaks for #1312 2023-09-28 19:21:06 +02:00
Wojtek Figat
279528a30d Merge branch 'marshalling_scriptingobject_changes' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-marshalling_scriptingobject_changes
# Conflicts:
#	Source/Engine/Engine/NativeInterop.Unmanaged.cs
#	Source/Engine/Scripting/Runtime/DotNet.cpp
2023-09-28 18:41:20 +02:00
Wojtek Figat
9731d76a94 Merge branch 'unloaded_assembly_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-unloaded_assembly_fix 2023-09-22 12:54:22 +02:00
Wojtek Figat
62c2008cbc Fix crash in C# JobSystem.Dispatch due to GC collecting Delegate object 2023-09-22 12:50:50 +02:00
Wojtek Figat
31b3f56ddb Fix visibility of some internal NativeInterop methods for game bindings 2023-09-22 12:37:13 +02:00
7d69abadb7 Fix script reload crash with .NET libraries 2023-09-21 19:44:01 +03:00
2d2bfd9cd1 Include EditorModules in Assembly lookup paths 2023-09-16 14:15:09 +03:00
Wojtek Figat
c32a139dbd Fix crash when unboxing managed structure with refs into Variant 2023-08-29 11:57:18 +02:00
42ab218a8e Merge branch 'master' into marshalling_scriptingobject_changes
# Conflicts:
#	Source/Engine/Engine/NativeInterop.Invoker.cs
#	Source/Engine/Engine/NativeInterop.Unmanaged.cs
2023-08-20 20:24:41 +03:00
Wojtek Figat
342ec4c3c2 Merge branch 'arraytype_cache' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-arraytype_cache 2023-08-14 15:36:27 +02:00
53b1d0dd85 Optimize ScriptingObject managed initialization 2023-08-13 23:56:27 +03:00
d4d404ac0b Optimize native interop marshallers runtime type checking 2023-08-13 22:28:56 +03:00
1254af8bbb Optimize UnboxValue performance, safety and memory usage
- Avoids unnecessary boxing of the converted values by storing them in
unmanaged memory.
- Wrap ToNative-method in a delegate and cache it
- Fixes returning address to unpinned memory by pinning POD-types for
a short period of time.
2023-08-13 21:53:42 +03:00
44b70d87e5 Cache MakeArrayType results in native interop 2023-08-13 21:42:40 +03:00
Wojtek Figat
11bb6d4364 Fix crash when using custom Anim Graph node (.NET 7 regression) 2023-07-24 14:23:28 +02:00
Wojtek Figat
c79952a4d6 Implement missing dotnet7 interop for field and stabilize interop 2023-07-04 17:57:59 +02:00
Wojtek Figat
9a1fd12a85 Fix sizeof struct within generic type instance
#1219
2023-07-03 11:42:15 +02:00
28335478bd Fix managed library location resolver 2023-07-02 21:56:41 +03:00