Search Unity

CollisionWorld can no longer be marked ReadOnly

Discussion in 'Entity Component System' started by Abbrew, Mar 12, 2020.

  1. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    417
    As a result, when using the Entities field in SystemBase, .WithReadOnly(collisionWorld) is no longer valid. This breaks the dependency management in my project. Is there any workaround?
     
  2. destructor465

    destructor465

    Joined:
    Jan 30, 2016
    Posts:
    18
    ReadOnly attribute is still working, so I suggest using it in IJobForEach or IJobForEachWithEntity job.
     
    Bas-Smit likes this.
  3. joepl

    joepl

    Unity Technologies

    Joined:
    Jul 6, 2017
    Posts:
    87
    Hey @Abbrew. This was an oversight on our part. .WithReadOnly will work on types that contain native containers in the next version of Entities.
     
    Abbrew likes this.