Search Unity

Inspecting Struct Layout

Discussion in 'Data Oriented Technology Stack' started by jRocket, Jul 29, 2021.

  1. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    608
    Is there any way to visualize how my structs are being laid out in memory? I would like to verify that it is being laid out how I think it should be, so I can optimize in terms of layout and padding.

    I found a tool for Visual Studio C++ code that does that. It would be neat to see something like it in the Unity editor.
     
    Last edited: Jul 29, 2021
    Lukas_Kastern and apkdev like this.
  2. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    819
    jRocket likes this.
  3. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    819
    And yes having such tool built in unity for MB and DOTS will be good :)
     
    Last edited: Jul 30, 2021
    francois85 and Lukas_Kastern like this.
  4. Scorr

    Scorr

    Joined:
    Jul 2, 2013
    Posts:
    72
    xVergilx, apkdev and jRocket like this.
unityunity