private static void __Instantiate__UnityEngineGameObject__UnityEngineGameObject(IUdonHeap heap, uint[] parameterAddresses) { GameObject original = heap.GetHeapVariable <GameObject>(parameterAddresses[0]); GameObject clone = Object.Instantiate(original); heap.SetHeapVariable(parameterAddresses[1], clone); }
private void __Instantiate__UnityEngineGameObject__UnityEngineGameObject(IUdonHeap heap, uint[] parameterAddresses) { GameObject original = heap.GetHeapVariable <GameObject>(parameterAddresses[0]); #if !UDON_DISABLE_SECURITY _blacklist.FilterBlacklisted(ref original); #endif GameObject clone = Object.Instantiate(original); heap.SetHeapVariable(parameterAddresses[1], clone); }
private void __Instantiate__UnityEngineGameObject__UnityEngineGameObject(IUdonHeap heap, Span <uint> parameterAddresses) { GameObject original = heap.GetHeapVariable <GameObject>(parameterAddresses[0]); #if !UDON_DISABLE_SECURITY _blacklist.FilterBlacklisted(ref original); #endif GameObject clone = Object.Instantiate(original); foreach (UdonBehaviour udonBehaviour in clone.GetComponentsInChildren <UdonBehaviour>(true)) { UdonManager.Instance.RegisterUdonBehaviour(udonBehaviour); } heap.SetHeapVariable(parameterAddresses[1], clone); }