예제 #1
0
    protected override void OnCreate()
    {
        m_beginBarrier = World.GetOrCreateSystem <BeginPresentationEntityCommandBufferSystem>();
        m_endBarrier   = World.GetOrCreateSystem <EndPresentationEntityCommandBufferSystem>();

        foreach (var system in World.Active.Systems)
        {
            int depth = 0;
            var type  = system.GetType();
            if (SystemUtils.IsInSystem(system.GetType(), typeof(InitializationSystemGroup), ref depth))
            {
                if (depth > 1)
                {
                    var groups   = type.GetCustomAttributes(typeof(UpdateInGroupAttribute), true);
                    var group    = groups[0] as UpdateInGroupAttribute;
                    var groupSys = World.GetOrCreateSystem(group.GroupType) as ComponentSystemGroup;
                    groupSys.AddSystemToUpdateList(World.GetOrCreateSystem(type));
                    AddSystemToUpdateList(groupSys);
                }
                else
                {
                    AddSystemToUpdateList(World.GetOrCreateSystem(system.GetType()));
                }
            }
        }

        SortSystemUpdateList();
    }
예제 #2
0
 protected override void OnCreateManager()
 {
     m_BeginEntityCommandBufferSystem = World.GetOrCreateManager <BeginPresentationEntityCommandBufferSystem>();
     m_EndEntityCommandBufferSystem   = World.GetOrCreateManager <EndPresentationEntityCommandBufferSystem>();
     m_systemsToUpdate.Add(m_BeginEntityCommandBufferSystem);
     m_systemsToUpdate.Add(m_EndEntityCommandBufferSystem);
 }
예제 #3
0
#pragma warning restore 0618

        protected override void OnCreate()
        {
            m_BeginEntityCommandBufferSystem = World.GetOrCreateSystem <BeginPresentationEntityCommandBufferSystem>();

#pragma warning disable 0618
            // warning CS0618: 'EndPresentationEntityCommandBufferSystem' is obsolete
            m_EndEntityCommandBufferSystem = World.GetOrCreateSystem <EndPresentationEntityCommandBufferSystem>();
#pragma warning restore 0618

            m_systemsToUpdate.Add(m_BeginEntityCommandBufferSystem);
            m_systemsToUpdate.Add(m_EndEntityCommandBufferSystem);
        }
 protected override void OnCreate()
 {
     endSimulationEntityCommandBufferSystem             = World.GetOrCreateSystem <EndSimulationEntityCommandBufferSystem>();
     endPresentationSimulationEntityCommandBufferSystem = World.GetOrCreateSystem <EndPresentationEntityCommandBufferSystem>();
     base.OnCreate();
 }
예제 #5
0
 protected override void OnCreateManager()
 {
     m_beginBarrier = World.GetOrCreateSystem <BeginPresentationEntityCommandBufferSystem>();
     m_endBarrier   = World.GetOrCreateSystem <EndPresentationEntityCommandBufferSystem>();
 }