Merge pull request #65046 from neikeq/dotnet-fix-exported-game-uninitialized-callbacks
C#: Fix exported game crash because of uninitialized callbacks
This commit is contained in:
commit
a5218989a2
1 changed files with 4 additions and 1 deletions
|
@ -27,7 +27,8 @@ namespace GodotPlugins.Game
|
|||
internal static partial class Main
|
||||
{
|
||||
[UnmanagedCallersOnly(EntryPoint = ""godotsharp_game_main_init"")]
|
||||
private static godot_bool InitializeFromGameProject(IntPtr godotDllHandle, IntPtr outManagedCallbacks)
|
||||
private static godot_bool InitializeFromGameProject(IntPtr godotDllHandle, IntPtr outManagedCallbacks,
|
||||
IntPtr unmanagedCallbacks, int unmanagedCallbacksSize)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -37,6 +38,8 @@ namespace GodotPlugins.Game
|
|||
|
||||
NativeLibrary.SetDllImportResolver(coreApiAssembly, dllImportResolver);
|
||||
|
||||
NativeFuncs.Initialize(unmanagedCallbacks, unmanagedCallbacksSize);
|
||||
|
||||
ManagedCallbacks.Create(outManagedCallbacks);
|
||||
|
||||
ScriptManagerBridge.LookupScriptsInAssembly(typeof(GodotPlugins.Game.Main).Assembly);
|
||||
|
|
Loading…
Reference in a new issue