• RuntimesGodot
  • NPE from SpineSprite Node in Windows build

Repro Steps:

  • create a SpineSprite with a spine animation.
  • Create a C# script that tries to access that node (I reference it as a Node2D to work around some issues I have been having issues with the C# and Spine).
  • from the script, do something with that Node (i.e. print its name or something)
  • run it in the editor. It works fine
  • create a windows export (making sure to install the correct export settings from the spine2D-godot docs page).
  • run the executable.

Expected: works just like the build in the editor did.
Actual: NPE when trying to access the node.

I've tried accessing the SpineSprite node through C# in a couple different ways:

  • GetNode<Node2D>("SpineSpriteNodeName")
  • as a public exported field that is exposed in the inspector
    Both with the same result where it works as expected in the editor, but errors out when I export it.

I also confirmed that it works correctly if I replace the SpineSprite node with another one.
Interestingly enough, the node itself does work correctly *it will still play animations", but I just can't access it from a C# script like at all.

Specs:
using the latest version of Godot and the export settings from the docs page (4.1.2.stable.mono).

Related Discussions
...

Ok so the workaround was to have a separate GDScript interface directly with the SpineSprite node. And then using some cross-language scripting, having the C# script use that GDScript as an in between. Still kind of a hacky solution though.

Please provide a small Godot project to repro this. I can't with our example project.