You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the RootNode getter on AnimationPlayer from C# causes the following error in both debug and release exports.
ERROR: System.TypeInitializationException: The type initializer for'Godot.AnimationMixer' threw an exception.
---> Godot.GodotObject+NativeMethodBindNotFoundException: Unable to find the native method bind. (Method 'AnimationMix) at Godot.GodotObject.ClassDB_get_method_with_compatibility(StringName type, StringName method, UInt64 hash) at Godot.AnimationMixer..cctor() --- End of inner exception stack trace --- at Godot.AnimationMixer.GetRootNode() at Godot.AnimationMixer.get_RootNode() at TestCSharp._Ready() in C:\Users\Pooh\Code\games\test-4.2dev6-animplayer\TestCSharp.cs:line 11 at Godot.Node.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) at Godot.CanvasItem.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) at Godot.Node2D.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) at TestCSharp.InvokeGodotClassMethod(godot_string_name& method, NativeVariantPtrArgs args, godot_variant& ret) in C:8 at Godot.Bridge.CSharpInstanceBridge.Call(IntPtr godotObjectGCHandle, godot_string_name* method, godot_variant** arg) at: void Godot.NativeInterop.ExceptionUtils.LogException(System.Exception) (:0)
The code runs fine in the editor and the same issue does not happen with GDScript.
Steps to reproduce
From scratch:
Create a C# script that references an AnimationPlayer.
Call AnimationPlayer.RootNode.
Create a debug or release export.
Run the export with console.
The scene will show a "GDScript" label, but not the "CSharp" label because the CSharp script errored.
ADD_SIGNAL(MethodInfo("mixer_updated")); // For updating dummy player.
#endif// TOOLS_ENABLED
I think this is the same as #72864. This was fixed by moving the #ifdef DEBUG_ENABLED to the methods implementation (#72922) so maybe we should do something similar here.
Godot version
4.2-dev6
System information
Windows 11
Issue description
Using the
RootNode
getter onAnimationPlayer
from C# causes the following error in both debug and release exports.The code runs fine in the editor and the same issue does not happen with GDScript.
Steps to reproduce
From scratch:
AnimationPlayer
.AnimationPlayer.RootNode
.With the MRP:
Minimal reproduction project
dotnet-getrootnode-mrp.zip
The text was updated successfully, but these errors were encountered: