I’m in the process of adding a model to my unit prefab, and when I try to run the project the model doesn’t show up. After some testing, it seems that the model ceases to exist when I run the project. Here’s a picture of my node hierarchy for the unit prefab:
The model in question is the node called “scooter”. I have a line that prints all the children, which outputs this:
[Torso:<Node3D#35265709392>, Legs:<Node3D#35332818260>, pilot:<Node#35383149911>, unitState:<Node#35399927128>, Properties:<Node3D#35416704345>, unitCollider:<CollisionShape3D#35450258779>, component_manager:<Node#35467035996>, structure_manager:<Node#35483813213>, UI:<SubViewport#35500590430>, HealthBar:<Sprite3D#35634808163>]
I’m relatively new to using Godot so I don’t know if there’s something obvious I’m missing. Any help is appreciated!
it depends on your script for the unit, do you perhaps do anything to the scooter?
Or remove any nodes via code?
Can you check the remore tab while running the game? does the scooter also disappear in your remote tab?
Thanks for the suggestion, I didn’t actually know about the remote tab. It doesn’t seem to show up there either when I run the project. None of the scripts except the one attached to scooter do anything related to it. The script attached to scooter is just setting parameters within an animation tree.
For additional context I made the model in blockbench which has caused a few problems down the line so I wouldn’t be surprised if it’s related to that.
Actually yes, I missed the errors in the debugger tab. It seems like it’s not loading the model correctly, but I can’t seem to figure out why. I’ve tried reimporting the model but the errors persist.
I am only familiar with importing .glb assets but i believe importing .gltf assets should be the same.
I would try to open the scooter.tscn scene file and check if you are able to do that.
If not, then I would close the project, completely delete the .godot folder and then reopen the project again. If necessary, I would reload the project from the Project menu.
I tried giving it a shot. Originally when I opened Godot before it came up with an error but it didn’t actually say anything, but now that I’ve deleted the .godot folder, the error appears to be displaying correctly now.
It seems to be a problem with the animation, but I don’t really understand what it means. I’ve imported the animation paths as files in the same folder, is
I seem to have gotten it working. Clearing the inheritance on the root node of the model seemed to stop the error from happening. Thanks for all the help!