Hi guys
I have a script on a prefab called TopHorizontalDestination
in here is an int called destinationPadNumber
The prefab is then instantiated via another script called PassengerManager
on my landing pad i have a script that im using to detect when the player has landed and i will also use this to compare if the players destination and the landing pad match.ie the passenger is at the correct pad.
on my landing pad script im trying to get a reference to the destinationPadNumber on the passenger clone:
public TopHorizontalDestination thDestination;
private void Start()
{
thDestination = GameObject.Find("HorizontalTop(Clone)").GetComponent<TopHorizontalDestination>();
}
But this just isnt working, i have tried many ways to get to the clones int on its script but nothing seems to work.
please help.
