Skip to content

0.0.12-preview.32

Pre-release
Pre-release
Compare
Choose a tag to compare
@marwie marwie released this 26 May 02:41

[0.0.12-preview.32] - 2019-05-16

New Features

  • Added BlobBuilder which is a new API to build Blob Assets that does not require preallocating one contiguous block of memory. The BlobAllocator is now marked obsolete.
  • Added versions of IJobForEach that support DynamicBuffers
    • Due to C# language contraints, these overloads needed different names. The format for these overloads follows the following structure:
      • All job names begin with either IJobForEach or IJobForEachEntity
      • All jobs names are then followed by an underscore _ and a combination of letter corresponding to the parameter types of the job
        • B - IBufferElementData
        • C - IComponentData
        • E - Entity (IJobForEachWithEntity only)
      • All suffixes for WithEntity jobs begin with E
      • All data types in a suffix are in alphabetical order
    • Here is the complete list of overloads:
      • IJobForEach_C, IJobForEach_CC, IJobForEach_CCC, IJobForEach_CCCC, IJobForEach_CCCCC, IJobForEach_CCCCCC
      • IJobForEach_B, IJobForEach_BB, IJobForEach_BBB, IJobForEach_BBBB, IJobForEach_BBBBB, IJobForEach_BBBBBB
      • IJobForEach_BC, IJobForEach_BCC, IJobForEach_BCCC, IJobForEach_BCCCC, IJobForEach_BCCCCC, IJobForEach_BBC, IJobForEach_BBCC, IJobForEach_BBCCC, IJobForEach_BBCCCC, IJobForEach_BBBC, IJobForEach_BBBCC, IJobForEach_BBBCCC, IJobForEach_BBBCCC, IJobForEach_BBBBC, IJobForEach_BBBBCC, IJobForEach_BBBBBC
      • IJobForEachWithEntity_EB, IJobForEachWithEntity_EBB, IJobForEachWithEntity_EBBB, IJobForEachWithEntity_EBBBB, IJobForEachWithEntity_EBBBBB, IJobForEachWithEntity_EBBBBBB
      • IJobForEachWithEntity_EC, IJobForEachWithEntity_ECC, IJobForEachWithEntity_ECCC, IJobForEachWithEntity_ECCCC, IJobForEachWithEntity_ECCCCC, IJobForEachWithEntity_ECCCCCC
      • IJobForEachWithEntity_BC, IJobForEachWithEntity_BCC, IJobForEachWithEntity_BCCC, IJobForEachWithEntity_BCCCC, IJobForEachWithEntity_BCCCCC, IJobForEachWithEntity_BBC, IJobForEachWithEntity_BBCC, IJobForEachWithEntity_BBCCC, IJobForEachWithEntity_BBCCCC, IJobForEachWithEntity_BBBC, IJobForEachWithEntity_BBBCC, IJobForEachWithEntity_BBBCCC, IJobForEachWithEntity_BBBCCC, IJobForEachWithEntity_BBBBC, IJobForEachWithEntity_BBBBCC, IJobForEachWithEntity_BBBBBC
      • Note that you can still use IJobForEach and IJobForEachWithEntity as before if you're using only IComponentData.
  • EntityManager.SetEnabled API automatically enables & disables an entity or set of entities. If LinkedEntityGroup is present the whole group is enabled / disabled. Inactive game objects automatically get a LinkedEntityGroup added so that EntityManager.SetEnabled works as expected out of the box.
  • Add WithAnyReadOnly and WithAllReadyOnly methods to EntityQueryBuilder to specify queries that filter on components with access type ReadOnly.
  • No longer throw when the same type is in a WithAll and ForEach delegate param for ForEach queries.
  • DynamicBuffer CopyFrom method now supports another DynamicBuffer as a parameter.
  • Fixed cases that would not be handled correctly by the api updater.

Upgrade guide

  • Usages of BlobAllocator will need to be changed to use BlobBuilder instead. The API is similar but Allocate now returns the data that can be populated:
  ref var root = ref builder.ConstructRoot<MyData>();
  var floatArray = builder.Allocate(3, ref root.floatArray);
  floatArray[0] = 0; // root.floatArray[0] can not be used and will throw on access
  • ISharedComponentData with managed fields must implement IEquatable and GetHashCode
  • IComponentData and ISharedComponentData implementing IEquatable must also override GetHashCode

Fixes

  • Comparisons of managed objects (e.g. in shared components) now work as expected
  • Prefabs referencing other prefabs are now supported in game object entity conversion process
  • Fixed a regression where ComponentDataProxy was not working correctly on Prefabs due to a ordering issue.
  • Exposed GameObjectConversionDeclarePrefabsGroup for declaring prefab references. (Must happen before any conversion systems run)
  • Inactive game objects are automatically converted to be Disabled entities
  • Disabled components are ignored during conversion process. Behaviour.Enabled has no direct mapping in ECS. It is recommended to Disable whole entities instead
  • Warnings are now issues when asking for a GetPrimaryEntity that is not a game object that is part of the converted group. HasPrimaryEntity can be used to check if the game object is part of the converted group in case that is necessary.
  • Fixed a race condition in EntityCommandBuffer.AddBuffer() and EntityCommandBuffer.SetBuffer()