Hi all, I develop my StateMachine in unity by following the book:
Learning C# by Developing Games with Unity 3D Beginner’s Guide
All works fine with the book exemple. Now I try to implement a game inside of it and I have a problem.
For the begin and setup state I use the scene00 which contain also the GameManager object. for the play state I use the scene01 where I have some GameObject for the game. When I start the play state I try to find this object and it seems ok but when I try to use/reference to the script attached I have and error during playMode. the game works but I don’t understand why I have this problem.
NullReferenceExeption:Reference not set to an instance of an object
Asset.Resources.Ceode.States.PlayState.StateUpdate()
StateManagerUpdate()
You canfind all my code in bitbuket:
https://bitbucket.org/ConfaMiky/mesa2015prj