コード例 #1
0
        protected override void OnUpdate()
        {
            var layer = sceneGlobalEntity.GetCollectionComponent <SpawnPointCollisionLayer>(true).layer;

            CompleteDependency();
            PhysicsDebug.DrawLayer(layer);
            UnityEngine.Debug.Log("SpawnPoints in layer: " + layer.Count);
        }
コード例 #2
0
        protected override void OnUpdate()
        {
            var layer = sceneBlackboardEntity.GetCollectionComponent <WormholeCollisionLayer>(true).layer;

            CompleteDependency();
            PhysicsDebug.DrawLayer(layer).Run();
            UnityEngine.Debug.Log("Wormholes in layer: " + layer.Count);
        }
コード例 #3
0
 protected override void OnUpdate()
 {
     Entities.WithAll <FactionTag, Faction>()
     .ForEach((Entity factionEntity) =>
     {
         var layer = EntityManager.GetCollectionComponent <FactionShipsCollisionLayer>(factionEntity, true);
         CompleteDependency();
         PhysicsDebug.DrawLayer(layer.layer);
     }).WithoutBurst().Run();
 }
コード例 #4
0
        protected override void OnUpdate()
        {
            CollisionLayerSettings settings = new CollisionLayerSettings
            {
                worldSubdivisionsPerAxis = new int3(2, 2, 2),
                worldAABB = new Aabb {
                    min = new float3(-50f, -50f, -50f), max = new float3(50f, 50f, 50f)
                },
            };

            Dependency = Physics.BuildCollisionLayer(m_query, this).WithSettings(settings).ScheduleParallel(out CollisionLayer layer, Allocator.TempJob, Dependency);
            Dependency = PhysicsDebug.DrawLayer(layer).ScheduleParallel(Dependency);
            Dependency = layer.Dispose(Dependency);
        }