Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
0
Members

Uncaught Error: Could not find a behavior class named "EnemyShipSpawnerAIBehavior" for actor "EnemyShipSpawner".

A topic by jcweaver created Sep 21, 2016 Views: 375 Replies: 1
Viewing posts 1 to 2

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).

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