skeleton code linking issues

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wooshuwu

I am trying to move a 3D mesh attached to a skeleton/armature using (c#) code. The mesh and armature were exported from Blender as a glTF 2.0 / .glb file and I dragged the file into a new empty project I made in Godot. Then I double clicked on the .glb file in Godot FileSystem and got a warning issue since it was “automatically” imported (not sure what that means), and I chose the option to create a new inherited scene. Various nodes were created and the mesh and everything were visible.

However, when I tried attaching a script to various nodes (one at a time): the parent node of the whole scene, the rig node, the root node, the armature node and the skeleton node, I could not even get a simple print statement to work (i.e. play in the output terminal) when I played the project. What am I doing wrong/missing, and how can I get the code to actually run? I’ve successfully run code in other Godot projects to test that that wasn’t the problem, I can provide any other information if necessary as well.

And You are still talking about attaching scripts to inherited scene and trying to run the same inherited scene ? I am asking, because when choosing this option after importing, a new scene is created of the same name as imported scene ( only different suffix ), and someone might mix them up.

Inces | 2021-12-23 19:08

Sorry for the delayed response. Thank you, this is exactly what turned out to be the issue. I made a new scene and it turned out to not be the main scene, when I set it to the main scene the code started to run.

wooshuwu | 2022-01-18 18:56