public void Awake() { RuntimeObjectRootComponent l_rootComponent = RuntimeObjectRootComponent.FindRootRuntimeObjectComponent(this); m_collider = GetComponent <Collider>(); RuntimeObjectContainer.RuntimeObjectsByCollider.Add(m_collider, l_rootComponent.m_InstanciatedRuntimeObject); }
public static RuntimeObjectRootComponent FindRootRuntimeObjectComponent(Component p_startComponent) { RuntimeObjectRootComponent l_rootComponent = p_startComponent.GetComponent <RuntimeObjectRootComponent>(); if (l_rootComponent == null) { l_rootComponent = p_startComponent.GetComponentInParent <RuntimeObjectRootComponent>(); } return(l_rootComponent); }
public RuntimeObject(RuntimeObjectRootComponent p_rootComponentReference) { RuntimeObjectContainer.RuntimeObjects.Add(this); m_childComponents = new List <RuntimeComponent>(); RuntimeObjectRootComponent = p_rootComponentReference; }
public virtual void Awake() { RuntimeObject = RuntimeObjectRootComponent.FindRootRuntimeObjectComponent(this).m_InstanciatedRuntimeObject; RuntimeObject.AddChildComponent(this); }