Exemplo n.º 1
0
        public void StructuralChangeAfterSchedulingEntityOnlyDependencyJobThrows()
        {
            var archetype = m_Manager.CreateArchetype(typeof(EcsTestData));
            var entity = m_Manager.CreateEntity(archetype);
            var group = EmptySystem.GetEntityQuery(typeof(EcsTestData));
            var handle = new EntityOnlyDependencyJob {
                entityType = m_Manager.GetArchetypeChunkEntityType()
            }.Schedule(group);

            Assert.Throws <InvalidOperationException>(() => m_Manager.DestroyEntity(entity));
            handle.Complete();
        }
Exemplo n.º 2
0
            protected override JobHandle OnUpdate(JobHandle inputDeps)
            {
                EntityManager.CreateEntity(typeof(EcsTestData));
                var group = GetEntityQuery(new ComponentType[] {});
                var job   = new EntityOnlyDependencyJob
                {
                    entityType = m_EntityManager.GetArchetypeChunkEntityType()
                };

                JobHandle = job.Schedule(group, inputDeps);
                return(JobHandle);
            }