Search Unity

ExclusiveEntityTransaction fails with Burst?

Discussion in 'Burst' started by Soaryn, Aug 7, 2019.

  1. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    328
    So interestingly I have a problem related to Burst with using the ExclusiveEntityTransaction.
    If trying to create an entity using the base Create method, it results in a misunderstanding of how to handle an Empty Array and errors out. My thought, was to then be over verbose and provide explicit information a variety of ways.
    Example of first error:
    Code (CSharp):
    1. var entity = Transactor.CreateEntity();
    2. //(0,0): error: Unexpected error while processing function `System.Array.Empty<Unity.Entities.ComponentType>()`. Reason: Object reference not set to an instance of an object at System.Array.Empty()
    3.  
    From there, I thought perhaps I should just create a new ComponentType[] and pass that, however then it indicates that it does not support creating a new managed array.

    Ok, cool, from there perchance providing an archetype, but sadly that results in "The managed function `Unity.Entities.ExclusiveEntityTransaction.get_ManagedComponentStore(Unity.Entities.ExclusiveEntityTransaction* this)` is not supported by burst"

    This led me to believe that perhaps that the ExclusiveEntityTransaction is not supported by Burst at all? I would appreciate some clarification :)