Exception "Burst Error BC1016" Caused by state.World.CreateSystem<T>()

I encountered this exception:
Burst error BC1016: The managed function `Unity.Entities.SystemState.get_World(Unity.Entities.SystemState* this)` is not supportedwhile usingstate.World.CreateSystem<MySystemGroup>()in my ISystem’s OnUpdate method.

It only shows up after the editor has recompiled the scripts and can be resolved by not using the “BurstCompile” attribute on the method.

These are sample codes:

[UpdateInGroup(typeof(GameSystemGroup))]
public partial struct MyOtherSystem : ISystem
{
    [BurstCompile]
    public void OnUpdate(ref SystemState state)
    {
        ......
        state.World.CreateSystem<GameWorldSystemGroup>();
        ......
        
       state.Enabled = false;
    }
......
[DisableAutoCreation]
public partial class GameWorldSystemGroup : ComponentSystemGroup
{
    protected override void OnCreate()
    {
        base.OnCreate();

        World.GetExistingSystemManaged<GameSystemGroup>().AddSystemToUpdateList(SystemHandle);

        AddSystemToUpdateList(World.CreateSystem<MySystemOne>());
        AddSystemToUpdateList(World.CreateSystem<MySystemTwo>());
        AddSystemToUpdateList(World.CreateSystem<MySystemThree>());
    }
}

Is this the correct way to create a SystemGroup and the ISystems it includes?
And is the lack of support for Burst an unavoidable side effect?

Additionally, I am using the Rider IDE, and I noticed that the code “state.World” has a warning (yellow squiggly underline) with the hint: Burst: Loading managed type 'World' is not supportedThis warning only appears for about 1 second when I change any code in the same file. I have to move the cursor over it within that 1-second window to check the hint, or it will disappear until the next time I change the code, as if there is no problem.

I think this disappearing behavior is a bug?

The hint is correct. World is a managed type. Primary rule: you can’t use/access managed objects it inside Bursted code.

AFAIK, this is wrong, you’re not supposed to do this in an ISystem or SystemBase.

You would want to look at ICustomBootstrap. And inspect the code of DefaultWorldInitialization.Initialize.