Thanks for looking. This is the error:
NullReferenceException: Object reference not set to an instance of an object
SelectionsManager.CheckPointerTool () (at Assets/Scripts/Utility/SelectionsManager.cs:91)
SelectionsManager.Update () (at Assets/Scripts/Utility/SelectionsManager.cs:43)
I understand it’s telling me that I’m not referring to an instance of an object. Basically, I’m trying to get objects one at a time from a list of objects. But the objects that I’m pulling from the the list don’t seem to be pointing to the instance of the objects.
public List<GameObject> selectionList = new List<GameObject>();
if (selectionList.Count >= 1)
{
foreach (GameObject obj in selectionList)
{
checkObject = obj;
RemoveFromSelection(checkObject);
checkObject.GetComponent<SelectionDisplay>().TurnOnSelectedObject();
}
}
So it looks like checkObject isn’t pointing at an instance. Does anyone know how to do this? Thx