API Changes: Graphics... how to get changes in?

just saw that b11 added

API Changes

  • Graphics: Added array property getters (e.g. GetFloatArray) for Material, MaterialPropertyBlock and Shader class.
  • Graphics: Added List overloads for array property setters for Material, MaterialPropertyBlock, Shader and CommandBuffer class.

wondering if having an overload option for a linked matrix array is doable before the beta ends?

as an alternative to using SetMatrixArray() every frame any values changes inside the array
also wondering about having an option to use a Matrix4x4ClassVersion

:slight_smile:

What exactly is a “linked matrix array” or “Matrix4x4ClassVersion”?

But I think the APIs won’t change any further for 5.5.

Sorry i didn’t learn programming formally, by linked i just mean pointing to the original c# array class instead of just coping it when i pass the array
which would mean having an extra option to specify how often updates should be copied to the graphics card
maybe an enum with Update, FixedUpdate, LateUpdate

and with “Matrix4x4ClassVersion” i just mean having an extra class version of Unity’s Matrix4x4 struct
so when we’re using an array of them we can use references to each element

“But I think the APIs won’t change any further for 5.5.”
is this something that may be considered for the future?

It is not trivial to share the same memory between scripting world and the underlying engine, plus copying by CPU is usually not a bottleneck, if you don’t do it thousands of time per frame. It’s unlikely to change it seems.

i see, thanks for the info @zeroyao :slight_smile: