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

When I run it directly
Screenshot_2

Hi,

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