Library\PackageCache\com.unity.entities@0.2.0-preview.18\Unity.Scenes.Editor\SubSceneImporter.cs(30,104): error CS0234: The type or namespace name 'CalculateCustomDependencyData' does not exist in the namespace'UnityEditor.Build.Pipeline.Tasks'(are you missing an assembly reference?)

The replacement, DefaultGameObjectInjectionWorld, is now null during custom bootstrap as it now runs before the default world is created. hmmm.

###

# Change log

## [0.2.0] - 2019-11-22

**This version requires Unity 2019.3 0b11+**

### New Features

* Automatically generate authoring components for IComponentData with IL post-processing. Any component data marked with a GenerateAuthoringComponent attribute will generate the corresponding authoring MonoBehaviour with a Convert method.
* BuildSettings assets are now used to define a single build recipe asset on disk. This gives full control over the build pipeline in a modular way from C# code.
* BuildSettings let you attach builtin or your own custom IBuildSettingsComponents for full configurability
* BuildPipelines let you define the exact IBuildStep that should be run and in which order
* IBuildStep is either builtin or your own custom build step
* BuildSettings files can be inherited so you can easily make base build settings with most configuration complete and then do minor adjustments per build setting
* Right now most player configuration is still in the existing PlayerSettings, our plan is to over time expose all Player Settings via BuildSettings as well to ease configuration of complex projects with many build recipes & artifacts
* SubScenes are now automatically converted to entity binary files & cached by the asset pipeline. The entity cache files previously present in the project folder should be removed. Conversion systems can use the ConverterVersion attribute to convert to trigger a reconversion if the conversion system has changed behaviour. The conversion happens asynchronously in another process. Thus on first open the subscenes might not show up immediately.

* Live link builds can be built with the new BuildSettings pipeline.
Open sub scene
* Closed Entity scenes are built by the asset pipeline and loaded via livelink on demand
* Opened Entity scenes are send via live entity patcher with patches on a per component / entity basis based on what has changed
* Assets referenced by entity scenes are transferred via livelink when saving the asset
* Scenes loaded as game objects are currently not live linked (This is in progress)
by assigning the LiveLink build pipeline

* `Entities.ForEach` syntax for supplying jobified code in a `JobComponentSystem`'s `OnUpdate` method directly by using a lambda (instead of supplying an additional `IJobForEach`).

* `EntityQueryMask` has been added, which allows for quick confirmation of if an Entity would be returned by an `EntityQuery` without filters via `EntityQueryMask.Matches(Entity entity)`. An EntityQueryMask can be obtained by calling `EntityManager.GetEntityQueryMask(EntityQuery query).`
* Unity Entities now supports the _Fast Enter playmode_ which can be enabled in the project settings. It is recommended to be turned on for all dots projects.
* The UnityEngine component `StopConvertToEntity` can be used to interrupt `ConvertToEntity` recursion, and should be preferred over a `ConvertToEntity` set to "convert and inject" for that purpose.
* _EntityDebugger_ now shows IDs in a separate column, so you can still see them when entities have custom names
* Entity references in the Entity Inspector have a "Show" button which will select the referenced Entity in the Debugger.
* An `ArchetypeChunkIterator` can be created by calling `GetArchetypeChunkIterator` on an `EntityQuery`. You may run an `IJobChunk` while bypassing the Jobs API by passing an `ArchetypeChunkIterator` into `IJobChunk.RunWithoutJobs()`.
* The `[AlwaysSynchronizeSystem]` attribute has been added, which can be applied to a `JobComponentSystem` to force it to synchronize on all of its dependencies before every update.
* `BoneIndexOffset` has been added, which allows the Animation system to communicate a bone index offset to the Hybrid Renderer.
* Initial support for using Hybrid Components during conversion, see the HybridComponent sample in the StressTests folder.
* New `GameObjectConversionSystem.ForkSettings()` that provides a very specialized method for creating a fork of the current conversion settings with a different "EntityGuid namespace", which can be used for nested conversions. This is useful for example in net code where multiple root-level variants of the same authoring object need to be created in the destination world.
* `EntityManager` `LockChunkOrder` and `UnlockChunkOrder` are deprecated.
* Entity Scenes can be loaded synchronously (during the next streaming system update) by using `SceneLoadFlags.BlockOnStreamIn` in `SceneSystem.LoadParameters`.
* `EntityCommandBuffer` can now be played back on an `ExclusiveEntityTransaction` as well as an `EntityManager`. This allows ECB playback to be invoked from a job (though exclusive access to the EntityManager data is still required for the duration of playback).

### Upgrade guide
* If you are using SubScenes you must use the new BuildSettings assets to make a build & run it. SubScenes are not supported from the File -> BuildSettings... & File -> Build and Run workflows.
* Entities requires AssetDatabase V2 for certain new features, we do not provide support for AssetDatabase V1.

### Fixes

* Setting `ComponentSystemGroup.Enabled` to `false` now calls `OnStopRunning()` recursively on the group's member systems, not just on the group itself.
* Updated Properties pacakge to `0.10.3-preview` to fix an exception when showing Physics ComponentData in the inspector as well as fix IL2CPP Ahead of Time linker errors for generic virtual function calls.
* The `LocalToParentSystem` will no longer write to the `LocalToWorld` component of entities that have a component with the `WriteGroup(typeof(LocalToWorld))`.
* Entity Debugger styling work better with Pro theme
* Entity Inspector no longer has runaway indentation
* Fixed issue where `AddSharedComponentData`, `SetSharedComponentData` did not always update `SharedComponentOrderVersion`.
* Fixes serialization issue when reading in managed `IComponentData` containing array types and `UnityEngine.Object` references.
* No exception is thrown when re-adding a tag component with `EntityQuery`.
* `AddComponent<T>(NativeArray<Entity>)` now reliably throws an `ArgumentException` if any of the target entities are invalid.
* Fixed an issue where the Entity Debugger would not repaint in edit mode
* Marking a system as `[UpdateInGroup(typeof(LateSimulationSystemGroup))]` no longer emits a warning about `[DisableAutoCreation]`.
* Fixed rendering of chunk info to be compatible with HDRP
* Fixed issue where `ToComponentDataArray` ignored the filter settings on the `EntityQuery` for managed component types.

### Changes

* Moved `NativeString` code from Unity.Entities to Unity.Collections.
* Updated dependencies for this package.
* Significantly improved `Entity` instantiation performance when running in-Editor.
* Added support for managed `IComponentData` types such as `class MyComponent : IComponentData {}` which allows managed types such as GameObjects or List<>s to be stored in components. Users should use managed components sparingly in production code when possible as these components cannot be used by the Job System or archetype chunk storage and thus will be significantly slower to work with. Refer to the documentation for [component data](Documentation~/component_data.md) for more details on managed component use, implications and prevention.
* 'SubSceneStreamingSystem' has been renamed to `SceneSectionStreamingSystem` and is now internal
* Deprecated `_SceneEntities` in `SubScene.cs`. Please use `SceneSystem.LoadAsync` / `Unload` with the respective SceneGUID instead. This API will be removed after 2019-11-22.
* Updated `com.unity.serialization` to `0.6.3-preview`.
* The deprecated `GetComponentGroup()` APIs are now `protected` and can only be called from inside a System like their `GetEntityQuery()` successors.
* All GameObjects with a ConvertToEntity set to "Convert and Destroy" will all be processed within the same conversion pass, this allows cross-referencing.
* Duplicate component adds are always ignored
* When adding component to single entity via EntityQuery, entity is moved to matching chunk instead of chunk achetype changing.
* "Used by Systems" list skips queries with filters
* Managed `IComponentData` no longer require all fields to be non-null after default construction.
* `ISharedComponentData` is serialized inline with entity and managed `IComponentData`. If a shared component references a `UnityEngine.Object` type, that type is serialized separately in an "objrefs" resource asset.
* `EntityManager` calls `EntityComponentStore` via burst delegates for `Add`/`Remove` components.
* `EntityComponentStore` cannot throw exceptions (since called as burst delegate from main thread.)
* `bool ICustomBootstrap.Initialize(string defaultWorldName)` has changed API with no deprecated fallback. It now simply gives you a chance to completely replace the default world initialization by returning true.
* `ICustomBootstrap` & `DefaultWorldInitialization` is now composable like this:
```
class MyCustomBootStrap : ICustomBootstrap
{
public bool Initialize(string defaultWorldName)
{
Debug.Log("Executing bootstrap");
var world = new World("Custom world");
World.DefaultGameObjectInjectionWorld = world;
var systems = DefaultWorldInitialization.GetAllSystems(WorldSystemFilterFlags.Default);

DefaultWorldInitialization.AddSystemsToRootLevelSystemGroups(world, systems);
ScriptBehaviourUpdateOrder.UpdatePlayerLoop(world);
return true;
}
}
```
* `ICustomBootstrap` can now be inherited and only the most deepest subclass bootstrap will be executed.
* `DefaultWorldInitialization.GetAllSystems` is not affected by bootstrap, it simply returns a list of systems based on the present dlls & attributes.
* `Time` is now available per-World, and is a property in a `ComponentSystem`. It is updated from the `UnityEngine.Time` during the `InitializationSystemGroup` of each world. If you need access to time in a sytem that runs in the `InitializationSystemGroup`, make sure you schedule your system after `UpdateWorldTimeSystem`. `Time` is also a limited `TimeData` struct; if you need access to any of the extended fields available in `UnityEngine.Time`, access `UnityEngine.Time` explicitly`
* Systems are no longer removed from a `ComponentSystemGroup` if they throw an exception from their `OnUpdate`. This behavior was more confusing than helpful.
* Managed IComponentData no longer require implementing the `IEquatable<>` interface and overriding `GetHashCode()`. If either function is provided it will be preferred, otherwise the component will be inspected generically for equality.
* `EntityGuid` is now constructed from an originating ID, a namespace ID, and a serial, which can be safely extracted from their packed form using new getters. Use `a` and `b` fields when wanting to treat this as an opaque struct (the packing may change again in the future, as there are still unused bits remaining). The a/b constructor has been removed, to avoid any ambiguity.
* Updated `com.unity.platforms` to `0.1.6-preview`.
* The default Api Compatibility Level should now be `.NET Standard 2.0` and a warning is generated when the project uses `.NET 4.x`.
* Added `[UnityEngine.ExecuteAlways]` to `LateSimulationSystemGroup`, so its systems run in Edit Mode.

I'm seeing play mode just freeze up for like 10 seconds soon after it starts. Something in the new packages but unsure as to how to profile what's going on. I can't start the profiler with play mode if Unity is frozen. Unless there is some way I don't know of it make the profiler start profiling play mode before I enter play mode?

I'm seeing play mode just freeze up for like 10 seconds soon after it starts. Something in the new packages but unsure as to how to profile what's going on. I can't start the profiler with play mode if Unity is frozen. Unless there is some way I don't know of it make the profiler start profiling play mode before I enter play mode?

Click to expand...

With or without domain reloading enabled?
Mine feels pretty snappy, near instant with domain reloading off now that I have it all updated.

One thing to note is conversion seems to have moved to the actual update loop in initialization.

Deleting my Library folder and re-importing everything has fixed the burst compiler, however some of my jobs are performing much worse than before.

1 in particular is taking about twice as long to execute, however this is actually using a custom job type so I'm going to investigate if something has changed with jobs.

-edit-

turning off safety checks somewhat fixed performance issues, though still feels a little slower from memory but I don't have hard numbers in front of me. Not sure what checks have changed as it definitely wasn't this expensive as it was causing this particular job on my stress test to go from 7-8ms to 20-22ms when checks are enabled.

Unity Technologies

DefaultGameObjectInjectionWorld. Really bad idea. Not how to solve the problem.

Click to expand...

A bit of background. There is a ton of code out there where the wrong world was used...

World.Active.GetExistingSystem<...> from inside a system. I dont know who started this but it grew like cancer...

The right pattern is :
World.GetExistingSystem<...>

[FONT=Roboto, sans-serif]it returns the world associated with the system.

In any case, the result was that way too many people used World.Active when that was entirely unnecessary. Now it has a name that discourages over use. We needed to do that to make sure that most systems at least the ones built by unity are multi-world compliant.

In dots shooter we use multi-world setup. Eg. when entering playmode by default we spawn a server world and a client world. Any code that used World.Active was not working correctly, so we had to fix it... This way it surfaced all of them. And you can make an active choice if you want World.DefaultGameObjectInjectionWorld or you were just the API wrong and should use use the World property on the system.

A bit of background. There is a ton of code out there where the wrong world was used...

World.Active.GetExistingSystem<...> from inside a system. I dont know who started this but it grew like cancer...

The right pattern is :
World.GetExistingSystem<...>

[FONT=Roboto, sans-serif]it returns the world associated with the system.

In any case, the result was that way too many people used World.Active when that was entirely unnecessary. Now it has a name that discourages over use. We needed to do that to make sure that most systems at least the ones built by unity are multi-world compliant.

In dots shooter we use multi-world setup. Eg. when entering playmode by default we spawn a server world and a client world. Any code that used World.Active was not working correctly, so we had to fix it... This way it surfaced all of them. And you can make an active choice if you want World.DefaultGameObjectInjectionWorld or you were just the API wrong and should use use the World property on the system.

Curious to hear why you think this was a bad idea?[/FONT]

Click to expand...

My main objection was specifically using the naming to solve the problem you stated. Without going into it in detail because I think it's fairly obvious, it's a poor choice of naming and takes a common idiom of current/active and pretty much obfuscates it. The intentional long and unwieldy part is just flat annoying.

So you have some end users not using the correct api's. That will sort itself out over time and it's not really doing any damage anyways. No reason to take a heavy handed approach that causes other bad side affects. Although here it sort of seems it was mainly to fix internal issues, but IMO that's an even less compelling reason to force something like this on end users.

I'm just going to point you to the word "preview" at the start of the package. Also mixed in with the fact it is a beta of an editor version. Starting a new project and playing around with it thus far has been relatively ok.

I'm just going to point you to the word "preview" at the start of the package. Also mixed in with the fact it is a beta of an editor version. Starting a new project and playing around with it thus far has been relatively ok.

Click to expand...

Thank you for pointing to the word "preview" I totally forgot that I work with the preview package for around 2 years. Oh and my Unity shortcut for some reasons has prefix "b" , I don't know what it means, oh beta yes, thank you for reminding me.

I mean removing bunch of API and slapping new minor version (2) on it does not justify nearly 1/2 year of waiting / Entering playmode takes 40 seconds / Burst exception coming out of nowhere / updating Burst, entering play-mode - crash

I was meaning more that this is a preview of a release candidate. Joachim had already mentioned there were issues stopping shipping this sooner, but people are always impatient, so when they get it and it different/broken/not what they thought, they rage.

But I can see that you are upset and unlikely to be too rationally reasoned with at the moment (anytime developers are upset we tend to get stuck in that mode until a bit of time has passed), so I wish you luck!

Unity Technologies

Thank you for pointing to the word "preview" I totally forgot that I work with the preview package for around 2 years. Oh and my Unity shortcut for some reasons has prefix "b" , I don't know what it means, oh beta yes, thank you for reminding me.

I mean removing bunch of API and slapping new minor version (2) on it does not justify nearly 1/2 year of waiting / Entering playmode takes 40 seconds / Burst exception coming out of nowhere / updating Burst, entering play-mode -

Click to expand...

Please check out Editor option to turn off domain reload when entering playmode. This is now fully supported in DOTS.
In EntityComponentSamples you can see how enter playmode time is now less than 300ms.

To keep things as simple as possible I tried placing a character with a skinned mesh renderer in a subscene.

I keep getting the following error:

ArgumentException: A component with type:BoneIndexOffset has not been added to the entity.
Unity.Entities.EntityComponentStore.AssertEntityHasComponent (Unity.Entities.Entity entity, Unity.Entities.ComponentType componentType) (at Library/PackageCache/com.unity.entities@0.2.0-preview.18/Unity.Entities/EntityComponentStoreDebug.cs:233)

So that's with Burst AOT disabled. If I turn Burst on, the player just crash right away with player.log saying "Crash!!!". I'm testing using a fresh new project (Unity 2019.3b12) and have all the latest versions (Entities, Burst, Hybrid Renderer, and Collections). Everything works fine in Editor.

Update: Everything A Okay now once I built using the new BuildSettings asset.

I'm pretty sure it is a massive oversight/bug. They are probably used to having the top level GameObjects be either subscenes, or the one root object for everything hybrid. TBH, that's not a bad organization structure.

Something went wrong while Post Processing the assembly (Assembly-CSharp.dll):

Object reference not set to an instance of an object

at Unity.Entities.CodeGen.TypeDefinitionExtensions.IsComponentSystem(Mono.Cecil.TypeDefinition arg)[0x00001]in/xxxx/Library/PackageCache/com.unity.entities@0.2.0-preview.18/Unity.Entities.CodeGen/CecilExtensionMethods.cs:142

at Unity.Entities.CodeGen.TypeDefinitionExtensions.IsComponentSystem(Mono.Cecil.TypeDefinition arg)[0x000a2]in/xxxx/Library/PackageCache/com.unity.entities@0.2.0-preview.18/Unity.Entities.CodeGen/CecilExtensionMethods.cs:156

at System.Linq.Enumerable+WhereEnumerableIterator`1[TSource].ToArray()[0x0001d]in<351e49e2a5bf4fd6beabb458ce2255f3>:0

at System.Linq.Enumerable.ToArray[TSource](System.Collections.Generic.IEnumerable`1[T] source)[0x0001f]in<351e49e2a5bf4fd6beabb458ce2255f3>:0

Something went wrong while Post Processing the assembly (Assembly-CSharp.dll):

Object reference not set to an instance of an object

at Unity.Entities.CodeGen.TypeDefinitionExtensions.IsComponentSystem(Mono.Cecil.TypeDefinition arg)[0x00001]in/xxxx/Library/PackageCache/com.unity.entities@0.2.0-preview.18/Unity.Entities.CodeGen/CecilExtensionMethods.cs:142

at Unity.Entities.CodeGen.TypeDefinitionExtensions.IsComponentSystem(Mono.Cecil.TypeDefinition arg)[0x000a2]in/xxxx/Library/PackageCache/com.unity.entities@0.2.0-preview.18/Unity.Entities.CodeGen/CecilExtensionMethods.cs:156

at System.Linq.Enumerable+WhereEnumerableIterator`1[TSource].ToArray()[0x0001d]in<351e49e2a5bf4fd6beabb458ce2255f3>:0

at System.Linq.Enumerable.ToArray[TSource](System.Collections.Generic.IEnumerable`1[T] source)[0x0001f]in<351e49e2a5bf4fd6beabb458ce2255f3>:0

I'm using 2019.3.0f0 and URP on a mac.

Click to expand...

I'm getting the same error with 2019.3.0f1 and HDRP on the mac, does aynone know how to solve it?

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.