예제 #1
0
 void OnValidate()
 {
     if (movableItem == null || movableItem.gameObject != gameObject)
     {
         movableItem = GetComponent <MovableItem>();
     }
 }
예제 #2
0
 void Reset()
 {
     movableItem = GetComponent <MovableItem>();
     gameObject.SetLayerRecursively(LayerName.InteractableItem);
 }