I have an interact script that im using to test if the player is trying to interact with an object. i also have a screen manager script to switch the players point of view for every level. i have a door that sends the player to a location if they walk through the door (by presing the activation key). however the camera stays where it is, i already have all the movement coding set up in the screenswitcher script i just need the two scripts to comunicate (basicly i need a way to have a variable from the interact script alert the screenswitcher script when to do its thing). (im not the best at coding and all the “solutions” i have found on the forums and on YT are way complex).
OtherScript other;
void Awake()
{
other = GetComponent<OtherScript>();
}
And then just access other.
void DoSomeThing()
{
other.DoIt(value);
}
Note the variable or method that you want to access in other need to make at public
1 Like
ok thank you
that really helps me out alot