Beispiel #1
0
 public GameObjectMomento()
 {
     mPosition   = new SerializeV3(Vector3.zero);
     mRotation   = new SerializeQ(Quaternion.identity);
     mScale      = new SerializeV3(Vector3.one);
     mIsEnabled  = true;
     mPrefabName = "";
     mUniqueId   = Guid.NewGuid().ToString();
 }
Beispiel #2
0
 public virtual void UpdateMomentoData(object obj, string prefabName)
 {
     if (obj != null)
     {
         GameObject go = (GameObject)obj;
         //Debug.Log(go.name);
         if (go != null)
         {
             mPosition   = new SerializeV3(go.transform.position);
             mRotation   = new SerializeQ(go.transform.rotation);
             mScale      = new SerializeV3(go.transform.localScale);
             mIsEnabled  = go.activeSelf;
             mPrefabName = prefabName;
         }
     }
 }