Commit Graph

96 Commits

Author SHA1 Message Date
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
Wojtek Figat
3119c50789 Fix nullable warnings 2023-06-28 20:09:01 +02:00
87e96a9017 Fix native library lookup after hot reload 2023-06-20 16:29:04 +03:00
Wojtek Figat
6b8d8b7913 Various fixes and improvements to auto-generated bindings usability 2023-06-12 14:35:11 +02:00
Wojtek Figat
652f8ccb8d Fix crash when reading field value from C# in AOT on iOS 2023-06-11 15:05:14 +02:00
Wojtek Figat
ad1c573678 Fix false-positive error when interop structure has a additional memory size (alignment) 2023-05-25 00:12:54 +02:00
Wojtek Figat
3e792e6cd7 Add NativeInteropException for native interop crashes 2023-05-19 13:52:30 +02:00
cbe07b842f Fix resolving managed scripts references in Editor 2023-05-11 22:11:46 +03:00
Wojtek Figat
8b2d3db3f1 Fix passing boxed reference values to managed thunk and properly unbox non-POD structures 2023-04-18 15:54:54 +02:00
Wojtek Figat
9a84f9e4ac Improve native library path on dotnet when using plugins 2023-04-17 14:06:47 +02:00
Wojtek Figat
609217a3bb Fix using Nullable<T> in C# properties
Fixes #935
2023-04-12 15:47:03 +02:00
7df5a7c646 Fix managed method invoker delegate caching 2023-04-09 18:25:14 +03:00
Wojtek Figat
12f4dc74d2 Optimize default C# stdlib references to prevent using jit-ed features in a game assembly 2023-04-01 23:34:05 +02:00
Wojtek Figat
dfca248ebd Optimize C# IsCollectible to be used in Editor-only builds 2023-03-31 14:56:57 +02:00
Wojtek Figat
a25eae5d10 Move dotnet7 native interop, wrappers and marshalers into FlaxEngine.Interop namespace 2023-03-28 13:20:18 +02:00
Wojtek Figat
52fb941237 Refactor Native Interop codebase with cleanup/rename 2023-03-28 12:53:06 +02:00
Wojtek Figat
0694f87b0d Fixes for Visual Scripting interop via C# on new dotnet7 hosting 2023-03-28 12:01:55 +02:00
Wojtek Figat
ed13de2d5b Fix using managed arrays with Variant in dotnet7 2023-03-27 19:41:53 +02:00
Wojtek Figat
4755c42d70 Fix .NET generic class typename to match old mono style without inlined assembly name and ver 2023-03-27 17:30:48 +02:00
Wojtek Figat
510fc443e8 Refactor CoreCLR runtime into explicit dotnet api instead of mocking mono api
Required by platforms that will use mono under the hood for .Net 7
New `USE_CSHARP` define for C# ability
Engine doesn't use `mono_*` apis directly but via MCore/MClass/MMethod/ apis
2023-03-27 17:29:42 +02:00
Wojtek Figat
aaaf7c5c37 Various fixes to scripting 2023-03-06 16:17:52 +01:00
Wojtek Figat
a17981bc87 Merge branch 'system_array_marshalling' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-system_array_marshalling 2023-02-28 10:26:56 +01:00
Wojtek Figat
f88dd50098 Merge commit '272ffe2ea22eecb8f7cd6662efc1cadbe5593feb' into dotnet7 2023-02-27 23:17:04 +01:00
Wojtek Figat
499df770cc Match C++ managed memory alloc with C# for scripting 2023-02-27 22:56:15 +01:00
87e9046e41 Fix native to managed marshalling of System.Array 2023-02-19 20:33:12 +02:00
1c74e89f0d Revert "Add System.Array interop from native return to managed world"
This reverts commit 272ffe2ea2.
2023-02-19 20:32:50 +02:00
Wojtek Figat
272ffe2ea2 Add System.Array interop from native return to managed world 2023-02-19 16:58:37 +01:00
Wojtek Figat
45a0b25ee4 Fix after merge 2023-02-13 10:52:11 +01:00
Wojtek Figat
2a6fb3ba81 Merge branch 'threadsafe_managedarraypool' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-threadsafe_managedarraypool 2023-02-13 10:04:03 +01:00