Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in '5.5 Beta' started by AVOlight, Nov 9, 2016.

  1. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    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

    :)
     
  2. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    What exactly is a "linked matrix array" or "Matrix4x4ClassVersion"?

    But I think the APIs won't change any further for 5.5.
     
  3. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    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?
     
  4. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    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.
     
  5. AVOlight

    AVOlight

    Joined:
    Apr 15, 2014
    Posts:
    427
    i see, thanks for the info @zeroyao :)