You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
C#: Fix exported game crash because of uninitialized callbacks
This was a regression from 2c180f62d9,
where I forgot to update the source generator.
This commit is contained in:
@@ -27,7 +27,8 @@ namespace GodotPlugins.Game
|
|||||||
internal static partial class Main
|
internal static partial class Main
|
||||||
{
|
{
|
||||||
[UnmanagedCallersOnly(EntryPoint = ""godotsharp_game_main_init"")]
|
[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
|
try
|
||||||
{
|
{
|
||||||
@@ -37,6 +38,8 @@ namespace GodotPlugins.Game
|
|||||||
|
|
||||||
NativeLibrary.SetDllImportResolver(coreApiAssembly, dllImportResolver);
|
NativeLibrary.SetDllImportResolver(coreApiAssembly, dllImportResolver);
|
||||||
|
|
||||||
|
NativeFuncs.Initialize(unmanagedCallbacks, unmanagedCallbacksSize);
|
||||||
|
|
||||||
ManagedCallbacks.Create(outManagedCallbacks);
|
ManagedCallbacks.Create(outManagedCallbacks);
|
||||||
|
|
||||||
ScriptManagerBridge.LookupScriptsInAssembly(typeof(GodotPlugins.Game.Main).Assembly);
|
ScriptManagerBridge.LookupScriptsInAssembly(typeof(GodotPlugins.Game.Main).Assembly);
|
||||||
|
|||||||
Reference in New Issue
Block a user