public GameObjectInitMessage(GameObject go) { ttsid = go.GetComponent <TTSID>().id; position = go.transform.localPosition; rotation = go.transform.localRotation; parentTTSID = TTSID.Get(go.transform.parent); tag = go.tag; name = go.name; prefabID = TTSPrefabID.Get(go); }
public static string Get(GameObject go) { TTSPrefabID p = go.GetComponent <TTSPrefabID>(); return(p == null ? "" : p.prefabID); }