So what I'm trying to do is call a function from another script.
okay that's the Manager Sample , here the other
I know this might be a simple question but this is bugging me since Ive done it before, I might even answer this myself after further research but just to post in case someone has same problem in future.
Note: The error is on the Manager.cs "The name 'SetPlayerPosition' does not exist in the current context"
You need to create a reference to a specific instance of the Player script (i.e. to the game object it is attached to). The multiple ways to do this are covered here:
Then you will use a variable pointing to that instance of the script to make the access. Something like:
answered Jul 08, 2013 at 08:50 PM