Quantcast
Channel: Questions in topic: "get"
Viewing all articles
Browse latest Browse all 215

problem with get{} and set{}

$
0
0
I wrote some code like this and make it a prefab: class monster:monobehaviour{ private int _health; public int health { get{return _health;} set{_health = value;} } } the problem is : I can't find a way to fill the "health" in the inspector panel of this prefab,is there a solution? (or I must erase the accessors and make _health public?)

Viewing all articles
Browse latest Browse all 215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>