Hi! I am attempting to read a variable from within another script on another gameobject, but the script is not showing up as an accessible component.
Typically I would do something like:
if (GameObject.Find("NameOfGameObjectImLookingFor").GetComponent<NameOfScript>().VariableINeed == true)
{
//do something
}
But the NameOfScript
is not popping up in my Visual Studio intellisense, even when other scripts ARE showing up.
The script I am trying to access on the other game object is the InteractionSlider.cs script as seen in the Basic UI example from the LeapMotion Modules folder.
Perhaps the way the script was originally set up was to be hidden, or I need to access it's interaction Manager first... not sure. Any tip in the right direction would be very helpful!