The associated script cannot be loaded

Hi. I got a problem. When I try to load my “Game” scene by clicking a button on another scene, I get this error under every script and enemies don’t spawn, but when I run the “Game” scene directly it works fine.

When I load from another scene.

When I run it directly


Does the file name match the class name inside the file? For example, is the State class inside the State.cs file?

No, it doesn’t. Silly mistake. Thank you a lot.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms