You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add AsNativeArray() read‑only accessor to NetworkList<T> (#3567)
Continues: #3562 from @harayuu9
This PR exposes the contents of a `NetworkList<T>` as a **read‑only
`NativeArray<T>`**.
It addresses the recurring need to interoperate efficiently with
Burst‑compiled or `IJob`‑based code without paying the cost of
element‑wise copies or allocations.
The accessor simply forwards `m_List.AsReadOnly()`, preserving
zero‑allocation semantics while respecting `NativeArray`’s lifetime
constraints (call‑site must guarantee the list is not mutated or
disposed).
No behavioural changes are introduced—only a pure additive surface‑area
expansion.
## Changelog
- Added: `NetworkList<T>.AsNativeArray()` to return the list contents as
a `NativeArray<T>.ReadOnly`.
## Testing and Documentation
- No tests have been added.
- Includes documentation for the newly added public API function.
## Backport
This adds a new API surface area and so no backport is required.
---------
Co-authored-by: Yuto Harada <[email protected]>
0 commit comments