When trying to build no definition for name function in EntityManager

When running the code in the editor, things seem to work fine but when I try to build it I get the following error

I’m using Entities 0.14.0-preview.19 - September 10, 2020
trying to make a build for windows x86_x64

error CS1061: 'EntityManager' does not contain a definition for 'GetName' and no accessible extension method 'GetName' accepting a first argument of type 'EntityManager' could be found (are you missing a using directive or an assembly reference?)

Expected behaviour, GetName is only for debug and so editor only

2 Likes

is SetName also only for debug and editor only, I know entityQueries can be made using .WithName

EntityManager.SetName/GetName is Editor only
string name of entity is not used in ECS. It’s only for debugging. Never let your logic depend on it.

.WithName is to give a name for the generated job, it doesn’t filter the entities by name