diff options
author | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-01-21 21:51:12 +0100 |
---|---|---|
committer | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-01-21 23:11:37 +0100 |
commit | 3f1241cb82da4e405093c5a552e68c933beb0af3 (patch) | |
tree | 56616f3c767fc08f13573498ce9a7409a491d0e4 /modules/mono | |
parent | c3539b4561f9b4d7dc4ba1c5859217e7fbf9c6fe (diff) |
C#: Allow use of .NET 7
The editor will use .NET 7 if it is installed and fall back to .NET 6 otherwise.
Exported projects will use .NET 7 or .NET 6 depending on the value of TargetFramework in the csproj.
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotPlugins/GodotPlugins.csproj | 1 | ||||
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotPlugins/GodotPlugins.csproj b/modules/mono/glue/GodotSharp/GodotPlugins/GodotPlugins.csproj index e720d3878c..e58d730ee3 100644 --- a/modules/mono/glue/GodotSharp/GodotPlugins/GodotPlugins.csproj +++ b/modules/mono/glue/GodotSharp/GodotPlugins/GodotPlugins.csproj @@ -8,6 +8,7 @@ <!-- To generate the .runtimeconfig.json file--> <EnableDynamicLoading>true</EnableDynamicLoading> + <RollForward>LatestMajor</RollForward> </PropertyGroup> <ItemGroup> diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs index fa79c2efbc..aa9e2cb8eb 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/InteropStructs.cs @@ -104,7 +104,7 @@ namespace Godot.NativeInterop } } - [StructLayout(LayoutKind.Explicit)] + [StructLayout(LayoutKind.Sequential, Pack = 8)] // ReSharper disable once InconsistentNaming public ref struct godot_variant { @@ -113,11 +113,11 @@ namespace Godot.NativeInterop => (godot_variant*)Unsafe.AsPointer(ref Unsafe.AsRef(in _typeField)); // Variant.Type is generated as an enum of type long, so we can't use for the field as it must only take 32-bits. - [FieldOffset(0)] private int _typeField; + private int _typeField; // There's padding here - [FieldOffset(8)] private godot_variant_data _data; + private godot_variant_data _data; [StructLayout(LayoutKind.Explicit)] // ReSharper disable once InconsistentNaming |