Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feedback Missing functions for Buffer in SystemBase

Discussion in 'Entity Component System' started by RamType0, Jan 7, 2021.

  1. RamType0

    RamType0

    Joined:
    Sep 11, 2018
    Posts:
    67
    - SystemBase.HasComponent<T> is not available for Buffer
    Although EntityManager.HasComponent<T> is available for Buffer

    - The buffer which we got by SystemBase.GetBuffer<T> always marked as read write
     
    Sarkahn likes this.
  2. vectorized-runner

    vectorized-runner

    Joined:
    Jan 22, 2018
    Posts:
    383
    You can use BufferFromEntity.HasComponent
     
    RamType0 likes this.
  3. RamType0

    RamType0

    Joined:
    Sep 11, 2018
    Posts:
    67
    Yeah I know,we could also use BufferFromEntity to get buffer as readonly.
    But it means just we can.
    Any function which is specific for SystemBase is just provided for comfortabillity.