unity check if gameobject in gameobject code example
Example 1: unity if gameobject exists
if (GameObject.Find("WhateverItsCalled") != null){ //it exists}
Example 2: unity c# check how many of an object exists
TotalAmount = FindObjectsOfType<Object>().Length;