Issue with Unity ECS adding system

Hello everyone,

i have an issue it like this I have two systems one of them is to create entities that is just work my issue start that. the system that controls movement and rotation it is never shown in the unity systems window also, it not even works I kind of lost what the issue is and how to fix it


also, this the code

    public partial struct InstantiateProtectorEntity : IComponentData {
        public float2 NoSpawnRadius;
        public Entity ProtectorPrefab;
        public Entity SpawnPointPrefab;
        public float2 SpawnProtectorsRadius;
        public uint MaxProtectorsToSpawn;
        public uint MaxSpawnPointEntitiesToSpawn;
        public uint MinSpawnPointEntitiesToSpawn;
    }

        public partial struct ProtectorMetaDataEntity : IComponentData {
            public Random RandomObj;
            public uint Seed;
        }
        public partial struct ProtectorMovementEntity : IComponentData {
            public float3 Movement;
            public Quaternion Rotation;
        }
public readonly partial struct InstantiateProtectorAspect : IAspect {
        private readonly TransformAspect _transform;
        private readonly RefRO<InstantiateProtectorEntity> _controllerEntity;
        private readonly RefRW<ProtectorMetaDataEntity> _controllerEntityMetaData;
        public uint NumberProtectorToSpawn => _controllerEntityMetaData.ValueRW.RandomObj.NextUInt(15, (uint)_controllerEntity.ValueRO.MaxProtectorsToSpawn);
        public Entity ProtectorPrefab => _controllerEntity.ValueRO.ProtectorPrefab;
        public uint Seed => _controllerEntityMetaData.ValueRO.Seed;
        
        #region Protecor Transform
        public UniformScaleTransform GenRandomProtectorScaleTransform() {
            return new UniformScaleTransform {
                Position = _getRandomProtectorPosition(),
                Rotation = _getRandomRotation(),
                Scale = _getRandomScale(0.7f)
            };
        }

        private float3 _minCorner(float3 halfDimensions) => _transform.Position - halfDimensions;
        private float3 _maxCorner(float3 halfDimensions) => _transform.Position + halfDimensions;

        private float3 _protectorHalfDimensions => new() {
            x = _controllerEntity.ValueRO.SpawnProtectorsRadius.x * 0.5f,
            y = 0f,
            z = _controllerEntity.ValueRO.SpawnProtectorsRadius.y * 0.5f
        };

        private float3 _getRandomProtectorPosition() {
            float3 randomPos;
            int maxRetry = 5;
            int currectRetry = 0;
            do {
                float3 minCorner = _minCorner(_protectorHalfDimensions);
                float3 maxCorner = _maxCorner(_protectorHalfDimensions);
                randomPos = _controllerEntityMetaData.ValueRO.RandomObj.NextFloat3(minCorner, maxCorner);
                Debug.Log($"random pos: ${randomPos}, minCorner=${minCorner}, maxCorner=${maxCorner}, dist=${math.distancesq(_transform.Position, randomPos)}");
                currectRetry++;
                if (currectRetry <= maxRetry) {
                    break;
                }
            } while (math.distancesq(_transform.Position, randomPos) <= 20f);
            return randomPos;
        }

        private quaternion _getRandomRotation() => quaternion.RotateY(_controllerEntityMetaData.ValueRW.RandomObj.NextFloat(-0.5f, 0.5f));
        
        private float _getRandomScale(float min) => _controllerEntityMetaData.ValueRW.RandomObj.NextFloat(min, 1f);

        #endregion
        

    }

    [BurstCompile]
    [UpdateInGroup(typeof(InitializationSystemGroup))]
    public partial struct InstantiateProtectorSpawner : ISystem {
        private struct CoreSystemTag : IComponentData { }

        [BurstCompile]
        public void OnCreate(ref SystemState state) {
            state.RequireForUpdate<InstantiateProtectorEntity>();
        }

        [BurstCompile]
        public void OnDestroy(ref SystemState state) { }

        [BurstCompile]
        public void OnUpdate(ref SystemState state) {
            state.Enabled = false;
            var entityAspect = SystemAPI.GetAspectRW<InstantiateProtectorAspect>(SystemAPI.GetSingletonEntity<InstantiateProtectorEntity>());
            var ecb = new EntityCommandBuffer(Allocator.Temp);
            Debug.Log($"Perfab is {entityAspect.ProtectorPrefab}");
            for (var i = 0; i <= entityAspect.NumberProtectorToSpawn; i++) {
                var ent = ecb.Instantiate(entityAspect.ProtectorPrefab);
                var transform = entityAspect.GenRandomProtectorScaleTransform();
                ecb.SetName(ent, $"Protector #{i})");
                ecb.SetComponent(ent, new LocalToWorldTransform { Value = transform });
                ecb.AddComponent(ent, new ProtectorTag());
                ecb.AddComponent(ent, new ProtectorMetaDataEntity {
                    RandomObj = Random.CreateFromIndex(entityAspect.Seed),
                    Seed= entityAspect.Seed
                });
                ecb.AddComponent(ent, new ProtectorMovementEntity {
                    Movement = transform.Position,
                    Rotation = transform.Rotation
                });
                
                Debug.Log($"Create Game Object - {i}");
            }

            ecb.Playback(state.EntityManager);
            ecb.Dispose();
        }
    }

    public partial struct ProtectorMovementHandler : IJobEntity {
        public float Dt;
        public ProtectorMovementAspect EntityAspect;
        public float CurrentOrbitSpeed;
        public float CurrentRotationSpeed;

        private void Execute(ref LocalToWorldTransform entityTransform) {
            var transform = EntityAspect.GetOribitTransform(Dt, CurrentOrbitSpeed, entityTransform.Value);
            transform.Rotation = EntityAspect.GetCurrentRotaion(Dt, CurrentRotationSpeed, entityTransform.Value.Rotation);
            entityTransform.Value = transform;
        }
    }


    [BurstCompile]
    [UpdateAfter(typeof(InstantiateProtectorSpawner))]
    public partial struct ProtectorMovement: ISystem {
        private ProtectorMovementAspect _entityAspect; 
        private float _currentOrbitSpeed;
        private float _currentRotationSpeed;
        private struct CoreSystemTag : IComponentData { }
        private struct MovementTag : IComponentData { }

        [BurstCompile]
        public void OnCreate(ref SystemState state) {
            _entityAspect = SystemAPI.GetAspectRW<ProtectorMovementAspect>(SystemAPI.GetSingletonEntity<ProtectorMovementEntity>());
            _currentOrbitSpeed = _entityAspect.GetRandomOrbitSpeed();
            _currentRotationSpeed = _entityAspect.GetRandomRotationSpeed();
            state.RequireForUpdate<ProtectorMovementEntity>();
        }

        [BurstCompile]
        public void OnDestroy(ref SystemState state) {
        }

        [BurstCompile]
        public void OnUpdate(ref SystemState state) {
            var query = SystemAPI.QueryBuilder().WithAll<ProtectorMovementEntity>().Build();
            var job = new ProtectorMovementHandler {
                EntityAspect = _entityAspect,
                CurrentOrbitSpeed = _currentOrbitSpeed,
                CurrentRotationSpeed = _currentRotationSpeed,
                Dt = SystemAPI.Time.DeltaTime
            };
            job.ScheduleParallel(query);
        }
    }

Delete both:

var query = SystemAPI.QueryBuilder().WithAll<ProtectorMovementEntity>().Build();

and

state.RequireForUpdate<ProtectorMovementEntity>();

so you can rearticulate this qualifier as

[BurstCompile] [WithAll(typeof(ProtectorMovementEntity))]

attribute for ProtectorMovementHandler : IJobEntity

My guess here is that this unexpected code confuses or crashes code generators.

If that fails to resolve this:

Disable Burst and run this code again.

Jobs / Burst / ✓ Enable Compilation

The reason being that this system might be crashing silently with Burst and not even reporting it.