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

(Case 973872) PackedMemorySnapshot: Missing field(s) in TypeDescription

Discussion in '2017.3 Beta' started by Peter77, Nov 29, 2017.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,619
    Using the UnityEditor.MemoryProfiler API to capture a PackedMemorySnapshot, does not include fields of type System.Collections.Generic.List<int>. It does, however, include fields of type int[].

    Code (CSharp):
    1. public class TestCode : EditorWindow
    2. {
    3.     // m_intArray exists in the memory snapshpt
    4.     int[] m_intArray = new int[1] { 1 };
    5.  
    6.     // m_intList does NOT exist in the memory snapshpt
    7.     List<int> m_intList = new List<int>(new[] { 1 });
    8.  

    Reproduce
    • Open user attached project
    • Click Mainmenu > BugReport > Open TestCode Window
    • Click Capture Memory 'Editor' button
    Observe the text displays "field 'm_intList' missing".


    Expected
    TypeDescription contains fields of type System.Collections.Generic.List as well.
     
  2. lukaszunity

    lukaszunity

    Administrator

    Joined:
    Jun 11, 2014
    Posts:
    461
    Hi

    The issue with generic types not being included in the Mono snapshot has been fixed and should be available in a 2017.3 release soon.
     
    Peter77 likes this.
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,619
    That's great news! Thank you for the quick response.