I have a bit of code that is giving me a hard time and am running out of ideas on how to handle it.
My issue is I need to reset the GameObject which has missing elements that stick around after they have been deleted. I need a sure fire way to clear the GameObject of missing elements.
I have tried a few things already but non of them are working
System.Array.clear(GameObject, 0, GameObject.Length);
For(int i = 0; i < GameObject.Length; i++)
{
GameObject = null;
}
GameObject[] = null;
GameObject[] = new GameObject[0];
along with just trying to over-write the current elements(that are missing) with the new elements. To populate the GameObject[] I am using GameObject.FindObjectsWithTag(“Tag”);