コード例 #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!");
     }
 }