zoukankan      html  css  js  c++  java
  • (编辑状态下)Reset及OnValidate使用

    using UnityEngine;
    using System.Collections;
    
    public class Demo : MonoBehaviour {
    
    #if UNITY_EDITOR
        void Reset()
        {
            Debug.Log("把脚本添加到某个物体上就会执行,之后再按物体右上角小三角弹出对话框里的reset也会执行。");
        }
        void OnValidate()
        {
            Debug.Log("脚本被修改了之后就会执行");
        }
    #endif
    
    }
  • 相关阅读:
    数据库是什么以及用来干嘛
    10.3
    10.2
    12.7
    12.5
    12.4
    12.3
    12.2
    12.1JOptionPane
    11.30eclipse常用快捷键
  • 原文地址:https://www.cnblogs.com/Feiyuzhu/p/5688209.html
Copyright © 2011-2022 走看看