예제 #1
0
        public DisplayObj Instantiate(Vector3 goPos, Quaternion goRotation)
        {
            DisplayObj obj = new DisplayObj(name + "(copy)");

            obj.SetObjAndInstantiate(go);
            obj.localPosition = goPos;
            obj.localRotation = goRotation;
            return(obj);
        }
예제 #2
0
 public DisplayObj(string goName, bool createGO = true)
 {
     name = goName;
     if (createGO == true)
     {
         go       = new GameObject(name);
         instance = this;
         go.SetDisplayObj(ref instance);
         tran = go.transform;
     }
 }
예제 #3
0
 public virtual void SetGO(GameObject gameObject)
 {
     if (go == null)
     {
         go       = gameObject;
         instance = this;
         go.SetDisplayObj(ref instance);
         tran = go.transform;
     }
     else
     {
         Debug.LogError("DisplayObj's GameObject is not null!");
     }
 }