I’m trying to add a new player to my 2D game. The game works, everything compiles. The original player is just fine. I made a new scene to start setting up. I dragged a sprite in and named it Player, added an anim controller and set up the anim clips. So far so good.
I then drag the script Horizontal Movement onto the Player and it says: Script’s Type not Found
This is true for all the player scripts.
I have renamed player to myPlayer. Restarted Unity, tried Reimport all, tried a scene with the original player in it.
Even though the original player works, I can’t add the same scripts to a new sprite.
How do I fix this?
Looking at the scriots they are StateMachineBehaviour rather than monoBehavior.
They work fine on the original player. is there something I need to do to make them work on multiple objects?
These two things are completely incompatible and serve different purposes.
However, it would be totally reasonable to have some of each in a single project.
StateMachineBehaviours are intended for interoperating with Animators, and MonoBehaviours are the core of ALL on-GameObject scripting.
I ended up replacing the sprites of the player with the new artwork.
The player works with the statemachinebehavior scripts.
why can’t i just drop them onto a new player. what do i need to do to be able to make that work?