using UnityEngine;
using System.Collections;

public class Demo : MonoBehaviour {

#if UNITY_EDITOR
    void Reset()
    {
        Debug.Log("把脚本添加到某个物体上就会执行,之后再按物体右上角小三角弹出对话框里的reset也会执行。");
    }
    void OnValidate()
    {
        Debug.Log("脚本被修改了之后就会执行");
    }
#endif

}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2021-10-02
  • 2021-08-18
  • 2022-12-23
相关资源
相似解决方案