(string a_name, UInt64 a_identifierBits)
| 98 | } |
| 99 | |
| 100 | public void SpawnPrefab(string a_name, UInt64 a_identifierBits) { |
| 101 | UnityEngine.GameObject prefab; |
| 102 | if(m_prefabs.TryGetValue(a_name, out prefab)) { |
| 103 | UnityEngine.GameObject spawnedGO = UnityEngine.GameObject.Instantiate(prefab); |
| 104 | RustEntityComponent rustEntity = spawnedGO.AddComponent<RustEntityComponent>(); |
| 105 | rustEntity.IdentifierBits = a_identifierBits; |
| 106 | var rustyGameObject = new RustyGameObject(spawnedGO); |
| 107 | if(m_gameObjects.ContainsKey(a_identifierBits)) { |
| 108 | UnityEngine.Debug.LogError("id already exists: {}"+ a_identifierBits); |
| 109 | return; |
| 110 | } |
| 111 | m_gameObjects.Add(a_identifierBits, rustyGameObject); |
| 112 | } else { |
| 113 | UnityEngine.Debug.LogError("fail spawn prefab with name: " + a_name); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | public void UploadComponentTextmeshui(UInt64 a_identifierBits, string a_text) { |
| 118 | //UnityEngine.Debug.Log(a_identifierBits + " tried to upload text: " + a_text); |
nothing calls this directly
no outgoing calls
no test coverage detected