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:
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 supported```
This 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?