Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
0
Members

[Solved] "Uncaught Error: Could not find a behavior class named..."

A topic by Coyotl created Jan 30, 2017 Views: 464 Replies: 2
Viewing posts 1 to 3
(1 edit)

Hello,

I'm having the following issue where the Manager script in the following image,



Is assigned the behaviour of actor Manager in the Splash/Scene. When running the build, I get the issue of,

"Uncaught Error: Could not find a behavior class named "ManagerSplash" for actor "Manager". 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)."

Unfortunately I do not see a comprehensive solution to this, thoughts or solutions?

If I move my manager outside of the folder for Splash and make it the first most item in the hierarchy, it seems to work.


However I don't want that, I want to maintain the Manager script within Scenes/Splash. Since other scenes under the folder of Scenes will also have manager scripts. Ideas?

I found the solution,



So the issue lies in how when Superpowers compiles the game, the order scripts in the the hierarchy matter. Previously I had my Initialize script inside of Common/Scripts, I moved that out and to the end of the hierarchy. Initialize was responsible for loading the scene, so basically what happened is that is loaded the scene because the Initialize file was loaded and executed prior to the Manager in Scenes/Splash being loaded and executed.