Search Unity

(Case 1052308) PackedMemorySnapshot: nativeObject.isPersistent or documentation incorrect

Discussion in '2018.2 Beta' started by Peter77, Jun 23, 2018.

  1. Peter77


    QA Jesus

    Jun 12, 2013
    While working on Heap Explorer:

    ... I observed that either the 'isPersistent' flag of a nativeObject or its documentation is incorrect.

    The documentation says:

    According to my tests:
    • Assets: isPersistent=true
    • SceneObjects: isPersistent=false
    • Dynamically created scene objects: isPersistent=false
    The current behavior also does make more sense to me, because this allows to differentiate between assets and scene objects, whereas if it would behave as documented, it would not allow that.


    However, it does not behave in the documented way, so I submitted this bug-report to avoid building on functionality that might not be expected and change in the future.

    • Open user attached project
    • Build & Run a Windows 64bit Standalone Player
    • Connect Unity Profiler to Player
    • Click in Unity BugReport > Open TestCode Window
    • Click "Capture Memory"
    Observe in the output text that "MyTest_GameObject_In_Scene" shows isPersistent=false, but according to the documentation it should be isPersistent=true for scene objects.