MonoBehaviour.OnValidate

MonoBehaviour.OnValidate

  This function is called when the script is loaded or a value is changed in the inspector (Called in the editor only).

  脚本被加载、Value在Insepctor中被修改时此方法会被调用。

  

原文地址:https://www.cnblogs.com/tekkaman/p/4110392.html