Entities as optional dependency

In the newest beta updates it looks like entities is now a required dependency. Wouldn’t it be better for it to be optional? And the ECS stuff is conditionally compiled in if you have the entities package installed?

I’d prefer not to have the entities package installed at all.

Some new features (like local avoidance) are being built on top of the entities package. But I might be able to make it optional.

Just curious. Why do you want it as an optional dependency?

Hi -

I didn’t realize you were using it for RVO. I guess I assumed you would just use burst jobs for that. There seems to be some constant overhead when the entities package is in a project, and since my project is firmly in the monobehaviour+burst jobs stack, I never saw a reason to add it. That being said, I know next to nothing about the entities stuff, so maybe I am missing some configuration somewhere.

For now don’t worry about this request. Its not particularly useful without RVO anyway.

hi @aron_granberg I am getting errors related to entities after upgrading from 4.3.60 to 4.3.66.

Library\PackageCache\com.unity.entities@1.0.0-pre.47\Unity.Entities\ScratchpadAllocator.cs(194,39): error CS1061: 'UnsafeList<T>' does not contain a definition for 'GrowthPolicy' and no accessible extension method 'GrowthPolicy' accepting a first argument of type 'UnsafeList<T>' could be found (are you missing a using directive or an assembly reference?)

Any reason for that? I’ll would also gratefully accept entities being optional for the same reasons as @khammond.

I am using 2022.2.16f1, maybe the entities package isn’t supported here?


The entities package will be optional in the next beta update :slight_smile:

That’s really awesome! Appreciate that. Any ETA for the upcoming update?

Hopefully I can release it today.

1 Like

How does this “optional dependency” feature work? I have just installed 4.3.67 but it still installs entities 1.0.0-pre.47 like before (and thus breaks my project).

EDIT: when I manually install entities pre.65 it compiles just fine, but the thing is that I don’t want to have entities in my project for now :slight_smile: When I then remove it, it fallbacks to pre.47.

Sorry, I accidentally included it as a dependency anyway. I’ve uploaded 4.3.68 in which it is properly optional. :slight_smile:

1 Like