public GameObjectMomento() { mPosition = new SerializeV3(Vector3.zero); mRotation = new SerializeQ(Quaternion.identity); mScale = new SerializeV3(Vector3.one); mIsEnabled = true; mPrefabName = ""; mUniqueId = Guid.NewGuid().ToString(); }
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; } } }