Figured it out. If you run code that isnt in a class or a function, you have to put all the objects you are referencing above(in the hierarchy) the script you are writing in
jcweaver
2
Posts
1
Topics
A member registered Sep 21, 2016
Recent community posts
Superpowers community » SUPERPOWERS — HTML5 2D+3D GAME MAKER » Game Scripting & Shaders · Created a new topic Uncaught Error: Could not find a behavior class named "EnemyShipSpawnerAIBehavior" for actor "EnemyShipSpawner".
So I'm working on a game, and I get this error when appending a scene with a prefab in it. The prefab doesn't have any components other than a behavior script. The class name is correct (EnemyShipSpawnerAIBehavior), and I'm appending to the scene directly after loading the initial scene.
Error Message:
Uncaught Error: Could not find a behavior class named "EnemyShipSpawnerAIBehavior" for actor "EnemyShipSpawner". Make sure you're using the class name, not the script's name and that the class is declared before the behavior component is created (or before the scene is loaded).