You get an error because isAlive is static , which means that it is not part of any instance. If you want to assign a value to the isAlive property, you need to do this by type name:
PlayerData.isAlive = true;
But , looking at your code, you want to really remove static and access it through the instance link:
private bool _isAlive; public bool isAlive { get { return _isAlive;} set { _isAlive = value;} }
Then PlayerDataAr[x].isAlive = true; will work fine.
There is a good and simple explanation of the static keyword here .
source share