I have a custom class that extends RigidBody3D, to be used as a base for enemies and any enemies extend from that class, so that I don't have to rewrite universal enemy code like the health system and such for every single enemy. Whenever I have an enemy class nodes loaded into a scene it crashes. The base class for enemies works just fine, but anything that extends it breaks. I get a little warning message in the editor that says it has no shape and it simply just crashes when loaded in the game. Can anybody help me?
Extended class causes crash when loaded in to scene
Does it crash when your scene already has enemies in it and you don't instantiate them at runtime?
Without seeing your code we can only guess.
trizZzle Enemies are instantiated after the scene is loaded, not alongside it. I would show some code but there's so much stuff going on that even with the comments it would be hard for anyone who isn't me to find their way around the code.
- Edited
PizzaHutsAlat I'm not even entirely sure which file or files the problem is coming from
- Edited
PizzaHutsAlat Enemies are instantiated after the scene is loaded, not alongside it.
I know. But does it crash with existing enemies?
If not, it would mean the problem might be the way you instantiate your enemies.
But as I said, I can only guess with the given information.