MCPcopy Create free account
hub / github.com/TanTanDev/runity / ParentTo

Method ParentTo

unity/Runity/World.cs:88–98  ·  view source on GitHub ↗
(UInt64 a_childId, UInt64 a_parentId)

Source from the content-addressed store, hash-verified

86 }
87
88 private void ParentTo(UInt64 a_childId, UInt64 a_parentId) {
89 if(m_gameObjects.TryGetValue(a_childId, out var child)) {
90 if(m_gameObjects.TryGetValue(a_parentId, out var parent)) {
91 child.GameObject.transform.SetParent(parent.GameObject.transform, true);
92 } else {
93 UnityEngine.Debug.Log("no parent to bind child to " + a_childId + " " + a_parentId);
94 }
95 } else {
96 UnityEngine.Debug.Log("no child we can parent");
97 }
98 }
99
100 public void SpawnPrefab(string a_name, UInt64 a_identifierBits) {
101 UnityEngine.GameObject prefab;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected