#`Use of ExecuteAlways on systems is now

1 messages · Page 1 of 1 (latest)

indigo sphinx
#

Yes indeed, specifically, there's an Editor world, and that world runs in the editor. that flags simply says to the system that it should run in that world.
[AlwaysUpdateSystemAttribute] is btw the default now, so you can use [RequireMatchingQueriesForUpdate] to do the oppsite 😛

tranquil sky
# indigo sphinx Yes indeed, specifically, there's an Editor world, and that world runs in the ed...

Ok then, i've never used such things like live conversion and stuff, just good old authoring on awake conversion without subscenes. What can i read or what should i do if it can be described shortly to run in-editor-mode ECS logic.

I'm curious because i have custom sprite rendering system and i was writing mono rendering part to be able to see sprites in edit mode, so the perfect solution is to simulate rendering in edit mode to not duplicate logic

indigo sphinx
#
[WorldSystemFilter(WorldSystemFilterFlags.Editor)]
partial struct SomeEditorSystem : ISystem {
    public void OnCreate(ref SystemState state){}
    public void OnDestroy(ref SystemState state){}
    public void OnUpdate(ref SystemState state){
        foreach(var needsRendering in SystemAPI.Query<NeedsRendering>()) {
            var mesh = needsRendering.mesh;
            mesh.Render();
        }
    }
}

Odd example i know, but the gist is very simple, entities are avaiable in the editor world as longs as you can seem them as such in the entities hiarchry.
Basicaly you should just think of them like any other system.

tepid onyx
#

This part is not clear at all to me right now.