Search Unity

Resolved Missing methods in SystemAPI.ManagedAPI

Discussion in 'Entity Component System' started by desper0s, Dec 15, 2022.

  1. desper0s

    desper0s

    Joined:
    Aug 4, 2021
    Posts:
    15
    Hello all, this question is probably more for Unity employees.
    It seems like there are missing some methods like:

    SystemAPI.ManagedAPI.SetSingleton

    or

    SystemAPI.ManagedAPI.GetSingletonRW


    Is there any plan to add them in official 1.0 release?
     
  2. DaxodeUnity

    DaxodeUnity

    Unity Technologies

    Joined:
    Aug 5, 2021
    Posts:
    27
    Likely no plans. Given ManagedAPI.GetSingleton gives you back a reference type it is actually closer to SystemAPI.GetSingletonRW. Meaning that changing any value of what you got back from your ManagedAPI.GetSingleton will also change the value of the underlying component. As a result it is not needed to a SetSingleton or GetSingletonRW call for ManagedAPI.
     
    desper0s likes this.