Search Unity

0.2.0-preview.13

Discussion in 'Entity Component System' started by snacktime, Nov 22, 2019.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    All sorts of issues with the 0.2.0 preview packages. Were they supposed to be visible in the package manager?
     
  2. florianhanke

    florianhanke

    Joined:
    Jun 8, 2018
    Posts:
    426
    What kinds of issues? I have no issues so far (Unity 2020.1.a14).
     
    Last edited: Nov 22, 2019
  3. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Had issues as well. For some reason the dependency

    "com.unity.collections": "0.2.0-preview.13"

    in the jobs package was not auto resolving. Once that was manually updated my issues disappeared.
     
  4. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    For me it's
    Code (CSharp):
    1. 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?)
    With Scriptable Build pipeline 1.5.4

    EDIT : Entities 0.2 needs version 1.6.3 of scriptable build pipeline
     
    Last edited: Nov 22, 2019
    transat likes this.
  5. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Installing Collections on it's own fails, it works once you install entities.

    Hybrid Renderer multiple compiler errors.

    It all looks to be very fragile based on what exactly you have installed per package.
     
  6. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    World.Active deprecated and behavior changed.

    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.

    ### Known Issues
     
    pal_trefall, Enzi and SergeyRomanko like this.
  7. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I like the deprecation notes on World.Active, rare cases where you might need to access it outside of a system. Ya ok.
     
  8. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Convert and inject is just completely broken (at least in root objects)
    After looking at new conversion source....

    Code (CSharp):
    1. // All entities to be converted are marked to be destroyed
    2. foreach (var convert in toBeConverted)
    3.     toBeDestroyed.Add(convert.gameObject);
    4.  
    5. // Conversion happens
    6. foreach (var convert in toBeConverted)
    7.     AddRecurse(gameObjectWorld.EntityManager, convert.transform, toBeDetached, toBeInjected);
    8.  
    9. GameObjectConversionUtility.Convert(gameObjectWorld);
    10.  
    11. // Then injection happens
    12. var mappingSystem = gameObjectWorld.GetExistingSystem<GameObjectConversionMappingSystem>();
    13. foreach (var convert in toBeInjected)
    14.     InjectOriginalComponents(mappingSystem, convert);
    15.  
    16. // ...
    17.  
    18. // And then all the gameobjects are destroyed, even the injected objects
    19. foreach (var go in toBeDestroyed)
    20.     UnityObject.DestroyImmediate(go);
    21.  
    So now you have a bunch of destroyed components/gameobjects attached to your entity............

    -edit-

    yeah, simply adding an empty GO with convert entity script and attach your objects you want to use inject with as children then it works fine.
    just root objects which are broken.
     
    Last edited: Nov 23, 2019
  9. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    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?
     
  10. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    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.
     
  11. MartijnGG

    MartijnGG

    Joined:
    May 3, 2018
    Posts:
    74
    Built out players with Burst AOT disabled throw an exception upon start.

    Code (csharp):
    1. 'Message': 'Burst failed to compile the function pointer `Void AddComponentEntitiesBatchExecute(Unity.Entities.EntityComponentStore*, Unity.Collections.LowLevel.Unsafe.UnsafeList*, Int32)`'
    2. 'Stacktrace': '  at Unity.Burst.BurstCompiler.Compile[T] (T delegateObj, System.Boolean isFunctionPointer) [0x000f3] in <3e635592c8244e9c835505c46070ed2f>:0
    3. at Unity.Burst.BurstCompiler.CompileFunctionPointer[T] (T delegateMethod) [0x00000] in <3e635592c8244e9c835505c46070ed2f>:0
    4. at Unity.Entities.StructuralChange.Initialize () [0x00000] in <71559f61f83b471ca031f77599b51d27>:0
    5. at Unity.Entities.EntityManager..ctor (Unity.Entities.World world) [0x0000b] in <71559f61f83b471ca031f77599b51d27>:0
     
  12. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    So interestingly, while I have everything running on 0.2 with the latest burst package, not a single job is running bursted.

    The jobs compile fine. Synchronous compilation takes takes a while as expected and burst inspector shows the compiled jobs however performance is abysmal and the profiler shows no jobs, my own or unitys (physics, transform, hybrid renderer) as running burst compiled.

    While I did not update Burst (already had latest), going to give a library rebuild a shot see if it helps.
     
  13. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356

    Ah that sounds like why our main scene is freezing up. We do some pretty heavy burst jobs on scene load several seconds bursted before it stabilizes. Without burst we are fubar.
     
  14. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    And that was actually my first thought, I tried downgrading burst but entities relies on the latest. So for now just downgrading it all.
     
  15. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    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.

    everything seems /ok/ for now. up and running

    now to update hybrid render and to see what is up
     
    Last edited: Nov 23, 2019
    Sibz9000 likes this.
  16. BelkinAlex

    BelkinAlex

    Joined:
    Sep 28, 2015
    Posts:
    9
  17. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Goodbye lights

    Hello SkinnedMeshRenderer conversion
     
  18. Radu392

    Radu392

    Joined:
    Jan 6, 2016
    Posts:
    210
    * `EntityManager` `LockChunkOrder` and `UnlockChunkOrder` are deprecated.

    What? EntityManager is deprecated? And replaced by what?
     
  19. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    DefaultGameObjectInjectionWorld. Really bad idea. Not how to solve the problem.
     
  20. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    It refers to EntityManager is not deprecated. Just those two methods in it.
     
    Radu392 likes this.
  21. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    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]
     
    eterlan, Zoey_O, florianhanke and 9 others like this.
  22. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    oh dear, this might've been me because I think I did this everywhere(though I didnt use multiple worlds) and mightve been advising that via discord :oops:

    anywho... is ConvertAndInject supposed to be working as tertle highlighted?


    I am also not seeing the live entity preview in the inspector for subscenes, am I overlooking something or was this not part of the current release?
     
  23. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    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.
     
  24. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    328
    Are we unable to use Unity.Serialization that is a new dependency with the latest preview (preview18-0.2.0)? I'm getting an error indicating 'it is not available in current context'.

    I was hoping to use the Json aspect of it.

    Edit: Managed to get it to compile with using a asmdef (not ideal, but works for now);
    Moved the rest of the inquiry to its own thread for simplicity, https://forum.unity.com/threads/json-to-struct-with-nativestring-preview18-0-2-0.782123/
     
    Last edited: Nov 23, 2019
  25. Deleted User

    Deleted User

    Guest

    Thank you for such a wonderful update.

     
  26. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    328
    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.
     
    cirocontinisio and JoshAshby like this.
  27. Deleted User

    Deleted User

    Guest

    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

     
    Last edited by a moderator: Nov 23, 2019
  28. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    328
    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! :)
     
  29. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    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.
     
  30. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    260
    Hmm I can't seem to get the skinned mesh renderer working.

    Anyone get this to work?

    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)


    Are there any specific components I need to add to the character?
     
    mivasiliauskas and Robert-Brain like this.
  31. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    It requires the animation package. Which hasn't yet been released.
     
    pal_trefall, desertGhost_ and NotaNaN like this.
  32. Simontzky

    Simontzky

    Joined:
    Mar 11, 2015
    Posts:
    8
    What's the final state with ConvertToEntity set on "Convert and Inject "?

    It's not clear for me why this option is still destroying the object and I cannot use them as direct references.
     
    The-Oddler likes this.
  33. NotaNaN

    NotaNaN

    Joined:
    Dec 14, 2018
    Posts:
    325
    Speaking of which... I don't suppose you would have an ETA on that, would you? :p
     
  34. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    133
    I'm getting the same errors when trying to upgrade an existing project. What do they mea? And how do I fix them?

    I fixed this, read below

    I tried googling for the errors, but couldn't find anything as it seems to be too new.

    Here's the output in my console:

    and

    Edit:

    I only seem to get the errors when using "GenerateAuthoringComponent". Which doesn't seem to work, or I'm using it wrong: [removed]

    I was using it wrong, I had both the "Serializable" and "GenerateAuthoringComponent" attributes. Seems you should only use "GenerateAuthoringComponent"

    File: Health.cs (usings omitted)
    Code (CSharp):
    1. [GenerateAuthoringComponent]
    2. public struct Health : IComponentData
    3. {
    4.     int health;
    5. }
    6.  
    Then I don't get any errors any more!
     
    Last edited: Nov 24, 2019
  35. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    133
    I'm getting the same. Either this is a bug, or they changed what it means, as before it kept the gameobject alive.
     
  36. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    You need to use latest Burst 1.2 preview9. It's possible that your package manifest file references an older version of burst.
     
  37. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    133
    I updated it, but turns out I updated it to 1.1.3 rather than 1.2. Didn't see 1.2 before, weirdly. Anyway, updated it to 1.2.0 preview 9.

    The update gave a lot of errors, however they were solved by removing the Library folder.

    As before, it works if I only use "GenerateAuthoringComponent", without "Serializable". However using "Serializable" now gives a different error:

    'Health' is missing the class attribute 'ExtensionOfNativeClass'!

    But it still runs.

    However, the game object is still always deleted, even when the conversion mode is set to "Convert And Inject".
     
    Opeth001 likes this.
  38. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    484
    I'm curious about this too
     
  39. Tony_Max

    Tony_Max

    Joined:
    Feb 7, 2017
    Posts:
    353
    Does this mean that new update broke conversion with GOs which have SkinnedMeshRenderer? I ask because i want to wait for fixes for all this issues and not update DOTS near days
     
  40. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    133
    Could you explain this? Because that doesn't seem to work for me, or I'm interpreting your words wrong.

    I have an object with the convert to entity at the root:

    upload_2019-11-24_17-52-10.png

    upload_2019-11-24_17-52-18.png

    The player object just has a few components, no convert to entity script:

    upload_2019-11-24_17-53-5.png

    The root object is just being deleted along with my player.
     
  41. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Put a convert to entity script on the root (but not inject).

    Then on the child you want to inject put another convert to entity script with inject.
     
  42. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    133
    That works! Thanks a lot!

    My "player" object then becomes a root object, weirdly, but it works.
     
  43. Singtaa

    Singtaa

    Joined:
    Dec 14, 2010
    Posts:
    492
    I'm having some trouble with standalone player using the latest Entities release. Getting the same error as @MartijnGG

    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.
     
    Last edited: Nov 26, 2019
  44. ju_my

    ju_my

    Joined:
    Mar 7, 2017
    Posts:
    23
    It seems that now destroying or instantiating an entity with children, only the entity in parameter get destroyed/instanciated but not children.
     
  45. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    966
    Such a MVP comment! Thanks man, you've saved me some hours! It's so weird and unintuitive.
     
  46. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    This needing a root for conversion feels like a massive oversight/bug. That's entirely counter to the "it just works" hybrid flow they've been talking about.
     
  47. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,267
    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.
     
  48. Monguskan

    Monguskan

    Joined:
    Jan 2, 2013
    Posts:
    4
    Thanks for the immediate solution, I'm not sure if this is going to be the final way to deal with hybrid ECS.

    At least I would like to read what unity staff think about what is written out on this thread
     
  49. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    I'm getting the following...
    Code (CSharp):
    1. Something went wrong while Post Processing the assembly (Assembly-CSharp.dll) :
    2. Object reference not set to an instance of an object
    3.   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
    4.   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
    5.   at System.Linq.Enumerable+WhereEnumerableIterator`1[TSource].ToArray () [0x0001d] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
    6.   at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
    I'm using 2019.3.0f1 and URP on a mac.
     
    Last edited: Dec 3, 2019
  50. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    195

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