Search Unity

Official Entities 0.17 changelog

Discussion in 'Entity Component System' started by Brian_Will, Dec 10, 2020.

  1. Brian_Will

    Brian_Will

    Unity Technologies

    Joined:
    Apr 4, 2020
    Posts:
    13
    Here are the Entities package notes for the upcoming 0.17 DOTS release:

    ## [0.17.0] - 2020-11-13

    ### Added

    * ISystemBase interface for making struct based systems that allow Burst compiling main thread update
    * New UnsafeBufferAccessor struct that permit to un-typed and unsafe access the dynamic buffers pointers.
    * New ArchetypeChunk.GetUnsafeAccessor public API that allow to retrieve dynamic buffers unsafe accessors using DynamicTypeHandle.
    * safety check in DynamicComponentDataArrayReinterpret<T> that throw an ArgumentException if used to access the component data for IBufferDataElement type
    * ComponentSystemBase.TryGetSingleton
    * ComponentSystemBase.TryGetSingletonEntity
    * Tests for Tiny.UI transformations.
    * Added documentation for incremental conversion and dependencies
    * New scheduling API for `IJobEntityBatch` which limits the resulting batches to an input `NativeArray<Entity>`
    * BlobAssetStore. AddUniqueBlobAsset. A much simpler approach to managing blob assets during conversion. BlobAssetComputationContext continues to be the recommended approach for scalable blob asset generation.
    * UnsafeUntypedBlobAsset gives a non-generic untyped blob that can be created and later casted to a specific BlobAssetType. This can be used for storing multiple types of blob assets in the same container.
    * GameObjectConversionSystem.IsBuildingForEditor returns true when building data that will be loaded by the editor (As opposed to building data that will be loaded by the standalone player). This can be used to strip out editor only debug data.
    * GameObjectConversionSystem.BuildConfigGUID returns the GUID of the build config that is used by this conversion context
    * Tiny.UI support for 9-Slice (including sprite sheet support)
    * `DynamicSharedComponentHandle` and related methods for accessing shared components without compile time type information.
    * The public static method `EntitySelectionProxy.CreateInstance` was added. It creates, configures, and returns a valid instance of `EntitySelectionProxy`.
    * The public static method `EntitySelectionProxy.SelectEntity` was added. It creates, configures, and selects an instance of `EntitySelectionProxy`, without returning it.
    * All the public properties and methods of `EntitySelectionProxy` have been documented.
    * Tiny.UI support for text alignment
    * Tiny.UI support for multi-line text
    * TypeManager will now store whether or not an `ISharedComponentData` is managed or unmanaged.
    * EntityScenesInBuild class that allows registering EntityScenes that are generated via a custom asset importer into the build. This is used by the Environment system to generate streamable tile data that is generated procedurally from tile inputs.
    * New EntityCommandBuffer methods that affect a set of entities matching a query. Unlike existing methods, these new methods 'capture' the entities from the query at record time rather than playback time: the array of entities is stored in the command, and then playback of the command affects all entities of the array. The methods are `AddComponentForEntityQuery(EntityQuery, ComponentType)`, `AddComponentForEntityQuery(EntityQuery, ComponentTypes)`, `RemoveComponentForEntityQuery(EntityQuery, ComponentType)`, `RemoveComponentForEntityQuery(EntityQuery, ComponentTypes)`, `DestroyEntitiesForEntityQuery(EntityQuery)`.
    * EntityManager.Debug.GetEntitiesForAuthoringObject and EntityManager.Debug.GetAuthoringObjectForEntity. They provide a convenient API to map game object authoring & entity runtime representation.
    * New `ComponentSystemGroup.EnableSystemSorting` property allows individual system groups to opt out of automatic system sorting. **PLEASE NOTE:** Certain system update order constraints are necessary for correct DOTS functionality. Disabling the automatic system sorting should be only be a last resort, and only on system groups with full control over which systems they contain.
    * Entities.WithFilter(NativeArray<Entity> filteredEntities) allows for filtering with a set of specific entities in addition to the EntityQuery requirements
    * Added Live Conversion debug logging to more easily see what is reconverted (enable from the menu `DOTS/LiveLink Mode/Incremental Conversion Logging`)

    ### Changed

    * Update burst to 1.4.1.
    * Improved the performance of ILPostProcessor type resolution.
    * ProcessAfterLoadGroup is now public. This group runs after a subscene is loaded.
    * `Unity.Transforms` systems now use `IJobEntityBatch` instead of `IJobChunk`. Expect modest performance gains due to the new job type's lower scheduling overhead, depending on the workload size.
    * When `DOTS/Live Link Mode/Live Conversion in Edit Mode` is active in 2020.2 or later, conversion is now incremental
    * Removed deprecated `Entities.ForEach.WithDeallocateOnJobCompletion`. Please use `Entities.ForEach.WithDisposeOnCompletion` instead.
    * Fixed livelink patching for `BlobAssetReference<T>` fields in managed components and shared components.
    * Updated package `com.unity.platforms` to version `0.9.0-preview.15`.
    * `TypeManager.Equals` and `TypeManager.GetHashCode` performance has been improved when operating on blittable component types.
    * BlobAsset and entity patching for managed IComponentData & ISharedComponentData now use an early out if the class is known to not contain any blob assets or entity references
    * Managed class IComponentData now supports patching of entity references in EntityCommandBuffer.AddComponent.
    * Improved EntityManager.GetCreatedAndDestroyedEntities performance by introducing an internal entity creation / destruction version number that is used to early out when calling GetCreatedAndDestroyedEntities
    * TypeManger.TypeInfo.Debug has been removed. TypeName has been moved directly into TypeInfo and renamed to DebugTypeName.
    * Nested or variant prefabs used in a scene now correctly trigger reimports on subscenes when the parents parent prefab changes
    * Update minimum editor version to 2020.1.2f1
    * `EntitySelectionProxy` was streamlined to ensure that its usage does not override inspector locking behaviour and respects the Undo / Redo stack. With the new workflow, there is a 1:1 relationship between an Entity and its EntitySelectionProxy. Static utility methods were added to support this new workflow.
    * Rename `TypeManager.IsSharedComponent` to `IsSharedComponentType` and add `IsManagedType`
    *Enabled generic systems to be instantiated in non-tiny dots runtime
    * Updated platform packages to version `0.10.0-preview.1`.
    * Made SystemBase/JobComponentSystem classes partial in preparation of use of Roslyn source generators for code-generation (more to come).

    ### Deprecated

    * Forking of `GameObjectConversionSettings` is no longer supported
    * The public delegate `EntitySelectionProxy.EntityControlSelectButtonHandler` has been deprecated.
    * The public event `EntitySelectionProxy.EntityControlSelectButton` has been deprecated.
    * The public method `EntitySelectionProxy.SetEntity` has been deprecated.
    * The public method `EntitySelectionProxy.OnEntityControlSelectButton` has been deprecated.
    * The public property `EntitySelectionProxy.EntityManager` has been deprecated. Use `EntitySelectionProxy.World.EntityManager` manager instead. This change was made to remove boilerplate checks in the code.
    * Deprecated `Frozen` component as it is no longer in use

    ### Removed

    * Removed deprecated proxy component types. CopyTransformToGameObject, CopyTransformFromGameObject and CopyInitialTransformFromGameObject now use [GenerateAuthoringComponent] instead.
    * Removed expired `EntityManager.IsCreated` API
    * Removed expired API to compare `EntityManager` to `null` (`EntityManager` is a struct now)
    * Removed deprecated types and methods: `NativeArraySharedValue<S>`, implicit `EntityQuery` conversion to `null`, `ComponentDataFromEntity.Exists` and `BufferFromEntity.Exists`, `ArchetypeChunkArray.GetComponentVersion`, `IJobEntityBatch.ScheduleSingle`, `IJobEntityBatch.ScheduleParallelBatch`, `EntityManager.LockChunk`, `EntityManager.UnlockChunk`, `World.AllWorlds`, `World.CreateSystem`, all `GetArchetypeChunkX` methods, `EntityCommandBuffer.ToConcurrent` and `EntityManager.CreateChunk`
    * `ComponentSystemBase.ExecutingSystemType` has been removed. With the introduction of unmanaged systems, this information has been incorrect. Furthermore, there cannot be a `static` global property for this since multiple worlds might execute at the same time. If you need this information, consider passing it manually.

    ### Fixed

    * Wrong query and check in ACS_DynamicComponentDataArrayReinterpret
    * Fixed ICE (internal compiler error) thrown when storing into a field in reference type in bursted/scheduled lambda.
    * `EntityQuery.ToEntityArray` will work when temp memory is passed in an a parameter for allocator
    * `EntityQuery.ToComponentDataArrayAsync` and `EntityQuery.CopyFromComponentDataArrayAsync` will throw errors if user tries to use Temp memory containers.
    * Hybrid Component Lights flickering when LiveLink edited.
    * Fix crash when using singleton access methods with types with generic arguments.
    * Code generation for indexers in structs with [BurstCompatible] attribute.
    * Fixed potential `JobHandle` leak if an exception was thrown while scheduling an `IJobForEach`.
    * Fixed that `DynamicBuffer.RemoveAtSwapBack` only copied the first byte of its element data
    * Updating the shadow world via the EntityDiffer is now using Burst
    * The 'New Sub Scene' menu item is no longer missing in the 'Create' drop down of the Hierarchy .
    * Overwriting Sub Scene file when creating new Sub Scene no longer logs an error but instead overwrites the user selected file.
    * Fixed livelink patching for `BlobAssetReference<T>` fields in managed components and shared components.
    * Fixed entities getting lost during LiveLink when moving GameObjects between multiple subscenes
    * Deprecated call to UnityWebRequest.isNetworkError in Unity.Scenes.FileUtilityHybrid
    * Generic jobs now get reflection data generated in more cases
    * Generic jobs will always work to schedule in editor (but may require attributes in Burst scheduling cases)
    * Selecting entities in the Entity Debugger window will now respect the locked state of the inspector.
    * several bugs where writing EntityBinaryFiles was not resulting in deterministic files. It is now guranteed that if entities are constructed in the same order, it will result in the same binary exact file.
    * Fixed a case where LiveLink would sometimes leave dangling entities when a scene is opened and closed repeatedly
    * `TypeManager.InitializeAllComponentTypes` no longer uses `DateTime.Now`, which can be very slow in players
    * Structural changes right after scheduling a job in a `SystemBase` no longer crash a player
    * Sorting a `ComponentSystemGroup` now correctly sorts any child groups, even if the parent group is already sorted.
    * The subscene inspector no longer allows you to unload section 0 if another section is still loaded, and it also disallows loading any section before section 0 is loaded
    * `EntityManager.CopyAndReplaceEntitiesFrom` no longer fails when the Entity capacity of the destination is larger than the capacity of the source
    * Hybrid components on disabled GameObjects are now also converted
    * Children of a nested Parent not updating LocalToWorld if Parent's LocalToWorld was changed by a custom system with an archetype containing a WriteGroup for LocalToWorld
    * `EntityQuery` APIs which take an input `NativeArray<Entity>` for filtering (such as `ToEntityArray()`) can now be called with ReadOnly `NativeArray<Entity>` without throwing an exception.

    ### Upgrade guide

    * managed class IComponentData now supports patching of entity references in EntityCommandBuffer.AddComponent. This can result in a significant performance regression if there might be an entity on the managed component when playing the command buffer. If a managed component has a reference to another class that is not sealed it is unprovable that there may or may not be entity references on it. Thus we have to walk the whole class data to apply it. If there is in fact no entity reference on a class referenced from a managed component, then it is recommended to mark the referenced class as sealed, so that the type manager can prove that there is no entity references present on the managed component and thus completely skip all relatively slow entity patching code.
     
  2. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    700
    Whoohoo, looking forward to it. Just got done porting to 0.16 / Physics 0.51....

    Seriously, thanks for continuing to move this forward, I know it's taken a slight step back for the 2021 roadmap, but I very much believe my game is only really possible a the scale I envision with DOTS (at least in Unity3d, that is). :)

    So... it's been of the most chaotic, challenging, but also rewarding learning journeys I had in over 10 years since I first touched Unity.

    Code (CSharp):
    1. New EntityCommandBuffer methods that affect a set of entities matching a query.
    2. EntityManager.Debug.GetEntitiesForAuthoringObject
    3. Entities.WithFilter(NativeArray<Entity> filteredEntities)
    And these are amazing.

    Code (CSharp):
    1. Update burst to 1.4.1.
    Is this accurate? Burst is shown to me as "R" (Verified?) at 1.4.3, is there anything we'd need to downgrade for?

    Code (CSharp):
    1. Made SystemBase/JobComponentSystem classes partial in preparation of use of Roslyn source generators.
    Halelujah!
     
    Last edited: Dec 10, 2020
    Lukas_Kastern likes this.
  3. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,011
    Is there any method for skipping patching for EntityCommandBuffer.AddComponent()? It is impossible to modify every referenced class to sealed class if it is from other pre-compiled library, like UnityEngine.dll.
     
  4. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    547
    Not released yet?
     
    Joe-Censored likes this.
  5. Brian_Will

    Brian_Will

    Unity Technologies

    Joined:
    Apr 4, 2020
    Posts:
    13
    Yes, I should have made this clearer in the title.
     
    Opeth001 likes this.
  6. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    547
    Do we have an ETA? Waiting to check struct System and burst generic job regression fix.
    And looks like per component enable/disable is not in the release?
     
    Lionious likes this.
  7. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    302
    Appreciate you posting the change log ahead of release though. Massively prefer this compared to having to download the package and see.
     
    charleshendry likes this.
  8. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    I didn't understand what patching of entity references means. And I didn't understand when the regression will occur.
    For example, I have the following managed component:
    Code (CSharp):
    1.     public class ComponentMesh : ISystemStateComponentData {
    2.         public Mesh mesh;      
    3.         public MaterialPropertyBlock block;
    4.         public int layer;
    5.         public ShadowCastingMode shadowCastingMode;
    6.         public LightProbeUsage lightProbeUsage;
    7.         public bool recieveShadows;
    8. }
    Will there be a performance regression in this case?
     
  9. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    962
    When you realize the patch notes are one month old and 0.17 is still not available ... :(
     
    cdm456852 likes this.
  10. BrianWill

    BrianWill

    Joined:
    Oct 10, 2014
    Posts:
    38
    Release should be soon after one last notable bug is fixed. Enabled bits are being worked on, but we can't make any guarantees at this point of what exactly lands or when.

    1.4.1 is accurate, and it's the version the other packages in the release have been tested against.

    When you create an entity via an ECB, you get back a temporary Entity value (which has a negative index) because the entity isn't yet created. In playback of an ECB, temporary Entity values recorded in the commands get 'fixed-up' (mapped to the appropriate real Entity value).

    For a managed IComponentData, the class itself and all class type fields would have to be sealed. Both Mesh and MaterialPropertyBlock are sealed, so you should just have to seal ComponentMesh itself.
     
    vx4, Singtaa and iamarugin like this.
  11. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Thank you very much for the clarification.
     
  12. Cell-i-Zenit

    Cell-i-Zenit

    Joined:
    Mar 11, 2016
    Posts:
    290
    Can we get a .WithSingleton<T>() method for Entities.ForEach? I do always a lookup on the singleton, then pass it to the foreach queries... its "ugly" and i would prefer a more clever way of doing it:

    maybe like this?

    Code (CSharp):
    1. Entities.WithSingleton<CoolSingletonClass>()
    2. .ForEach((ref CoolSingletonClass csc) => {
    3. etc
    4. })
     
  13. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,684
    Isn't
    GetSingleton<T>()
    for struct based
    IComponentData
    in system (and
    this.GetSingleton<T>() 
    for class based
    IComponentData
    ) not enough for you?
     
  14. BrianWill

    BrianWill

    Joined:
    Oct 10, 2014
    Posts:
    38
    Is the concern verbosity? Clarity? Job safety? The current way doesn't seem any more verbose to me:

    Code (CSharp):
    1.  
    2. var csc = this.GetSingleton<CoolSingletonClass>();
    3.  
    4. Entities..ForEach(() => {
    5.      // ... lambda captures csc
    6. }).Schedule();
     
  15. PublicEnumE

    PublicEnumE

    Joined:
    Feb 3, 2019
    Posts:
    729
    Really looking forward to this update!

    Can someone from Unity please make a comment here on the day when Entities 0.17 is released?
     
    Last edited: Dec 18, 2020
    Orimay, Opeth001, NotaNaN and 4 others like this.
  16. Cell-i-Zenit

    Cell-i-Zenit

    Joined:
    Mar 11, 2016
    Posts:
    290
    Maybe this is just my crappy understanding of the underlying technology, but i thought that stuff that is "Scheduled" can be run in parallel with other .Schedule() methods if they dont have dependencies on each other. The scheduling will also be deferred to "sometimes later" (-> not in the onUpdate method itself)?

    Now when i capture singletons, i dont know when the capture will happen. Does the capture happen the moment the onupdate method runs? Or does it happen when the scheduled job is executing?

    If i need to add the singleton to the foreach, its totally clear that the capture will happen the moment the scheduled method is executing.

    But i guess from the backlash in this thread there is no deferred execution of jobs so it doesnt matter. I thought the onupdate method is just defining the jobs and via code generation the jobs are generated. So i dont know how the singleton stuff "works" with that :(
     
    charleshendry likes this.
  17. friflo

    friflo

    Joined:
    Jan 16, 2016
    Posts:
    10
    var csc = this.GetSingleton<CoolSingletonClass>();
    is executed instantaneously. After the function returns it is assigned directly to the local (captured) variable csc.
    As all ECS components are a struct (a value types) it can be used in Burst'ed Jobs. So when the scheduled lambda inside the ForEach() is executed deferred it uses the value assigned to csc in the outer scope.
     
  18. Sarkahn

    Sarkahn

    Joined:
    Jan 9, 2013
    Posts:
    440
    Any time you call
    GetSingleton<CoolSingletonClass>
    on the main thread you are immediately forcing all jobs that use that component to complete (AFAIK). To prevent that you would do

    Code (CSharp):
    1. var cscEntity = GetSingletonEntity<CoolSingletonClass>();
    2. Entities.ForEach((Entity e)=>
    3. {
    4.     var csc = GetComponent/GetBuffer(cscEntity);
    5. }).Schedule();
    This way there's no component access until your job actually runs. I don't think that's much more verbose than your presented alternative though.
     
    Last edited: Dec 20, 2020
  19. BrianWill

    BrianWill

    Joined:
    Oct 10, 2014
    Posts:
    38
    It was on track for this month, but some notable bugs have pushed it back. Last I heard, the new target is mid-January.
     
  20. BrianWill

    BrianWill

    Joined:
    Oct 10, 2014
    Posts:
    38
    A ForEach that calls Schedule or ScheduleParallel is scheduled as a job, yes, and so the work is not yet finished (or even necessarily started) when Schedule or ScheduleParallel returns. In that sense, yes, they are deferred.

    Sarkahn makes a good point:

    While any ECS jobs are on the queue, it's safe to query for entities, but it's not always safe to read or write component values. GetSingletonEntity just runs a query that finds the one entity having a particular component, but GetSingleton retrieves that component's actual value, so GetSingleton has to complete all outstanding jobs that write to that component:

    Code (CSharp):
    1. public T GetSingleton<T>() where T : struct, IComponentData
    2.         {
    3.             var typeIndex = TypeManager.GetTypeIndex<T>();
    4.          
    5.             // Complete all outstanding jobs that write to the singleton component:
    6.             _Access->DependencyManager->CompleteWriteDependencyNoChecks(typeIndex);
    7.  
    8.              // ...
    9.  
    So there is some merit to the original suggestion because, if a singleton is only used in a ForEach, it would be better to wait to read the value when the ForEach job actually runs. In other words, already scheduled jobs that write to the singleton should just be made dependencies of the ForEach job instead of being immediately completed.

    I can't say for sure whether this is something we can or will do, but thanks, I'll pass along the idea! (Come to think of it, this arguably is a specific case of a more general problem: creating ForEach jobs that operate on entities of multiple queries. So maybe this is part of a broader discussion.)
     
    friflo, florianhanke and Timboc like this.
  21. Mockarutan

    Mockarutan

    Joined:
    May 22, 2011
    Posts:
    159
    Oh... That makes sense, but I did not realize this at all. So to be clear, should one always capture the entity outside of Schedule() and do a GetComponent inside?

    Edit: If there is more than one job scheduled, then is is better to do a straight GetSingleton outside of all of the schedules?

    Edit2: Would this pattern be loosing some performance because each execution for each entity is forced to get the singleton by themselves? This whole thing seems to have a lot more caveats than I thought...
     
    Last edited: Dec 20, 2020
  22. Sarkahn

    Sarkahn

    Joined:
    Jan 9, 2013
    Posts:
    440
    Yes, essentially you end up paying the GetComponent/GetBuffer cost (which is NOT cheap btw) for every single entity you're iterating over. You have a couple of options though - if you manually write an IJobChunk you can then move your GetComponent/GetBuffer call outside of the for loop. You then end up paying the cost for every chunk being iterated over, rather than every entity. Alternatively you can run an initial job to gather up all the data you need into some native container then pass that container into the next job.

    I'd love to see some kind API to make this faster/easier for buffers in particular, since personally I end up with a lot of cases where I want to access a buffer (representing my map, for example) throughout a lot of different jobs within a single frame.
     
    Last edited: Dec 20, 2020
  23. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    Well, there is always rather verbose version of doing it async:

    Code (CSharp):
    1.  
    2.             var                 singletonEntity    = GetSingletonEntity<YourSingletonComponent>();
    3.             var singleton = new NativeArray<YourSingletonComponent>(1, Allocator.TempJob);
    4.             Job.WithCode(() => { singleton[0] = GetComponent<YourSingletonComponent>(playerEntity); })
    5.                .Schedule();
    6.  
    7.             Entities
    8.                .WithDisposeOnCompletion(singleton)
    9.                .ForEach((ref Whatever    whatever) =>
    10.                 {
    11.                             // Access your singleton here
    12.                    
    13.                 })
    14.                .Schedule();
    15.  
    You can even make the array persistent so it doesn't allocate ever frame
     
  24. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
    Can you just write an extension method, something like this?

    Code (CSharp):
    1. public static class SystemBaseExtensions
    2. {
    3.     public static JobHandle GetSingleton<T>(this SystemBase system, JobHandle dependency, Allocator allocator, out NativeReference<T> singleton)
    4.         where T : unmanaged, IComponentData
    5.     {
    6.         singleton = new NativeReference<T>(allocator);
    7.  
    8.         return new GetSingletonJob<T>
    9.         {
    10.             Entity = system.GetSingletonEntity<T>(),
    11.             GetComponent = system.GetComponentDataFromEntity<T>(true),
    12.             Singleton = singleton,
    13.         }.Schedule(dependency);
    14.     }
    15.  
    16.     [BurstCompile] // probably won't be bursted anyway atm
    17.     private struct GetSingletonJob<T> : IJob
    18.         where T : unmanaged, IComponentData
    19.     {
    20.         public Entity Entity;
    21.         [ReadOnly] public ComponentDataFromEntity<T> GetComponent;
    22.  
    23.         [WriteOnly]
    24.         public NativeReference<T> Singleton;
    25.  
    26.         public void Execute()
    27.         {
    28.             Singleton.Value = GetComponent[Entity];
    29.         }
    30.     }
    31. }
    and just use it like

    Code (CSharp):
    1. Dependency = this.GetSingletonAsync<Translation>(Dependency, Allocator.TempJob, out var singleton);
    Disclaimer: haven't tested it
     
    Last edited: Dec 22, 2020
  25. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    982
    What are the replacements for `ComponentDataFromEntity.Exists` and `BufferFromEntity.Exists`?
     
  26. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
    HasComponent

    Code (CSharp):
    1.  
    2. [Obsolete("Use HasComponent() instead. Exists() will be (RemovedAfter 2020-08-20). (UnityUpgradable) -> HasComponent(*)")]
    3. public bool Exists(Entity entity)
     
    Last edited: Dec 29, 2020
    davenirline likes this.
  27. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    700
    I wonder what was wrong with Exists... but I've been using HasComponent for as long as I could think. :p

    PS: I guess what's wrong was that Exists wasn't verbose enough /s
     
  28. BrianWill

    BrianWill

    Joined:
    Oct 10, 2014
    Posts:
    38
    It's for consistency with EntityManager, where Exists() tests for existence of an entity and HasComponent() tests for presence of a component on an entity.

    EDIT: I guess it's actually to make ComponentDataFromEntity consistent with SystemBase, which has no Exists method. HasComponent early returns false if the entity doesn't exist, so it's not any more expensive than Exists would be. I'll ask though if there's a rationale for omitting Exists.
     
    Last edited: Jan 3, 2021
    bb8_1 and Thygrrr like this.
  29. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Last edited: Jan 7, 2021
  30. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    792
    0.17 is about 2 month old and not released. The next public release will probably be 0.18 or 0.19
     
    MNNoxMortem and vx4 like this.
  31. PublicEnumE

    PublicEnumE

    Joined:
    Feb 3, 2019
    Posts:
    729
    Whats the source for this? I believe the last time Unity commented on it, 0.17 was still slated for release in mid January, pending a few blocker bugs being addressed.

    ...I sincerely hope this is still the plan. I’ve been waiting nearly 4 months now for a show stopping issue to be fixed, and it’s already fixed in 0.17...
     
    charleshendry likes this.
  32. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,264
    Unity hasn't said anything, but whenever they encounter a shipstopping issue that takes longer than a couple of weeks to resolve, they typically skip a release. They did that for 0.12 and 0.15. This time around they were kind enough to share the release notes and new targets in advance, which are really helpful.

    I'm not sure whether we will see 0.17 or 0.18 next, but I am guessing 0.18.
     
    charleshendry and Thygrrr like this.
  33. Brian_Will

    Brian_Will

    Unity Technologies

    Joined:
    Apr 4, 2020
    Posts:
    13
    I've seen the release team talking recently as if January 18 is still the target for 0.17, but I can't guarantee if that target will be hit or if the plan might change.

    @optimise I'm not familiar with that issue tracking system, and I don't see anyway to get the mentioned zip file. Is there another link to the problem code?
     
  34. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    (Case 1279727) [Entities 0.14.0-preview.19] Subscene instantiate classic game object that shouldn't instantiate
     
  35. PublicEnumE

    PublicEnumE

    Joined:
    Feb 3, 2019
    Posts:
    729
    Fwiw, I was referring to this:

     
    Last edited: Jan 8, 2021
  36. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    613
    Ping
     
  37. dannyalgorithmic

    dannyalgorithmic

    Joined:
    Jul 22, 2018
    Posts:
    100
    Ding
     
  38. PublicEnumE

    PublicEnumE

    Joined:
    Feb 3, 2019
    Posts:
    729
    I was also really hoping for it today. Ah well...

    @Brian_Will, thank you for making this post, regardless of when it comes out. Please do it for later builds as well. :)
     
    Last edited: Jan 19, 2021
    leonsver1 and Sarkahn like this.
  39. RecursiveEclipse

    RecursiveEclipse

    Joined:
    Sep 6, 2018
    Posts:
    298
    Also eagerly waiting the update and appreciate the communication on expected changes.

    Also, I don't think it really needs a new post, but, someone please clean up the stickies. There are 18 stickied threads which take up 75% of the screen before we can see a normal post. Some of the posts can either be unstickied or the information should be combined into a single place(4 threads relating to samples?).
     
    jdtec likes this.
  40. Brian_Will

    Brian_Will

    Unity Technologies

    Joined:
    Apr 4, 2020
    Posts:
    13
    "At this point we're basically waiting for teams to update their respective packages for the core packages published at the end of last week. At this time I would still expect to release by Friday."

    @RecursiveEclipse I'll poke someone about that.
     
  41. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Subforums will solve this easily
     
    NotaNaN, Thygrrr and RecursiveEclipse like this.
  42. Brian_Will

    Brian_Will

    Unity Technologies

    Joined:
    Apr 4, 2020
    Posts:
    13
    @optimise Did you mean to post a link? I need a link to the code.
     
  43. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Nope. I just give u the bug report case number generated from Unity FogBugz. I believe you are able to access it since I always give case number for Unity developer to look into the bug report.
     
  44. ScottPeal

    ScottPeal

    Joined:
    Jan 14, 2013
    Posts:
    61
    Will the release have a getting started document by chance. I am finally making the hop to DOTS.

    VR Architect
     
  45. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    700
    Will we be able to implement ISystemBase on managed classes such as Monobehaviour or ScriptableObject descendants, instead of just structs?

    (doesn't need to burst compile, just looking for user friendly ways to inject asset references into certain systems)
     
  46. Brian_Will

    Brian_Will

    Unity Technologies

    Joined:
    Apr 4, 2020
    Posts:
    13
    @optimise I see. Didn't realize that case number was for fogbugz. I see it was assigned to someone a few months back. I'll check with them.
     
    optimise likes this.
  47. elJoel

    elJoel

    Joined:
    Sep 7, 2016
    Posts:
    125
    Can you provide some more info on how and when this can/should be used?
     
    lclemens likes this.
  48. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
    Should be used wherever possible as it'll speed up main thread code (such as scheduling etc), and unless dramatically changed recently, it's used something like this

    Code (CSharp):
    1. struct MySystem : ISystemBase
    2. {
    3.     void OnUpdate(ref SystemState state)
    4.     {
    5.         var jobHandle = new MyJob
    6.         {
    7.  
    8.         }.Schedule();
    9.     }
    10. }
    I'm not sure if they've managed to add lambda job support to it yet or not (hoping so.) Find out soon enough.
     
  49. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    Whenever I close a subscene I get this error:

    "Failed to import entity scene because the automatically generated SceneAndBuildConfigGUID asset was not present: 'Assets/Scenes/Island/IslandLevel.unity' -> ''
    UnityEngine.Debug:LogError (object)"

    I tried googling but not a single result comes up... Anyone seen this before?

    EDIT: Deleting the SceneDependencyCache folder fixed it.
     
    Last edited: Jan 21, 2021
  50. UsmanMemon

    UsmanMemon

    Joined:
    Jan 24, 2020
    Posts:
    87
    Finally! Its here + Other DOTs packages.