please help me how to get the value of "currentPeople.timeCount;" for example i have a script:
public class BuildingPlacement : MonoBehaviour
{
public GameObject currentPeople;public int DelayTime;private int timeCount;
}
if i want to say that
DelayTime = currentPeople.timeCount;
i try this code below and it says nullreferenceexception object reference not set to an instance of an object:
DelayTime = (BuildingPlacement)currentPeople.GetComponent(typeof(BuildingPlacement).timeCount);
How do I get the value of currentPeople.timeCount
? is it possible?