private int GenerateGameObjectGlobalId(GameObject go) { var index = m_vGameObjectsIndex[go.ClassId]; m_vGameObjectsIndex[go.ClassId]++; return(GlobalID.CreateGlobalID(go.ClassId + 500, index)); }
public GameObject GetGameObjectByID(int id) { var classId = GlobalID.GetClassID(id) - 500; return(m_vGameObjects[classId].Find(g => g.GlobalId == id)); }