예제 #1
0
        public void NotSchedulingWriteJobIsHarmless()
        {
            var entity = m_Manager.CreateEntity(typeof(EcsTestData));

            m_Manager.SetComponentData(entity, new EcsTestData(42));
            WriteSystem ws1 = World.GetOrCreateSystem <WriteSystem>();

            ws1.Update();
            ws1.SkipJob = true;
            ws1.Update();
        }
예제 #2
0
        public void IgnoredInputDepsThrowsInCorrectSystemUpdate()
        {
            var entity = m_Manager.CreateEntity(typeof(EcsTestData));

            m_Manager.SetComponentData(entity, new EcsTestData(42));
            WriteSystem ws1 = World.GetOrCreateSystem <WriteSystem>();
            ReadSystem2 rs2 = World.GetOrCreateSystem <ReadSystem2>();

            rs2.ignoreInputDeps = true;

            ws1.Update();
            Assert.Throws <System.InvalidOperationException>(() => { rs2.Update(); });
        }