Quantcast
Channel: Questions in topic: "class instance"
Viewing all articles
Browse latest Browse all 131

is class variable in a ScriptableObject automaticly Instantiated?

$
0
0
while I created an Instance of ScriptableObject with a class variable in it, in the inspector it shows the class variable as default instance of the class, do I still need to add a null checker before getting data from it?
![alt text][1]
[CreateAssetMenu(menuName = "VariableContainer/TimeContainer")] public class TimeContainer : VariableContainer { public Action OnValueChanged = delegate { }; public override TimeFormat Value { set { this.value = value; OnValueChanged.Invoke(this); } get { return value; } } public void Reset() { Value.Reset(); } } [1]: /storage/temp/153204-capture33.png

Viewing all articles
Browse latest Browse all 131

Trending Articles



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