コード例 #1
0
 /// <summary>
 /// Destruction.
 /// </summary>
 protected void OnDestroy()
 {
     // Clear default reference
     if (Default == this)
     {
         Default = null;
     }
 }
コード例 #2
0
        /// <summary>
        /// Initialization.
        /// </summary>
        protected void Awake()
        {
            if (setAsDefault)
            {
                Default = this;
            }

            if (dontDestroyOnLoad)
            {
                DontDestroyOnLoad(gameObject);
            }

            Blackboard = new DataBlackboard();
        }