コード例 #1
0
        public void Awake()
        {
            RuntimeObjectRootComponent l_rootComponent = RuntimeObjectRootComponent.FindRootRuntimeObjectComponent(this);

            m_collider = GetComponent <Collider>();
            RuntimeObjectContainer.RuntimeObjectsByCollider.Add(m_collider, l_rootComponent.m_InstanciatedRuntimeObject);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public RuntimeObject(RuntimeObjectRootComponent p_rootComponentReference)
 {
     RuntimeObjectContainer.RuntimeObjects.Add(this);
     m_childComponents          = new List <RuntimeComponent>();
     RuntimeObjectRootComponent = p_rootComponentReference;
 }
コード例 #4
0
 public virtual void Awake()
 {
     RuntimeObject = RuntimeObjectRootComponent.FindRootRuntimeObjectComponent(this).m_InstanciatedRuntimeObject;
     RuntimeObject.AddChildComponent(this);
 }