[ Web Proxy ]
URL:
Viewing: https://docs.unity3d.com/ScriptReference/Profiling.Profiler.GetTotalReservedMemoryLong.html [Back]  [Original]

Unity - Scripting API: Profiling.Profiler.GetTotalReservedMemoryLong
Version: Unity 6.5 (6000.5)
    • Supported
    • Legacy
    LanguageEnglish
    • C#

    Profiler.GetTotalReservedMemoryLong

    Suggest a change

    Success!

    Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

    Close

    Submission failed

    For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

    Close
    Your name Your email Suggestion* Submit suggestion

    Cancel

    Declaration

    public static long GetTotalReservedMemoryLong();

    Returns

    long Memory reserved by Unity in bytes. This returns 0 if the Profiler is not available.

    Description

    The total memory Unity has reserved.

    This function returns the total memory Unity has reserved for current and future allocations. If the reserved memory is fully used, Unity will allocate more memory from the system as required.

    using UnityEngine;
    using UnityEngine.Profiling;

    public class Example : MonoBehaviour { void Update() { Debug.Log("Total Reserved memory by Unity: " + Profiler.GetTotalReservedMemoryLong() + "Bytes"); Debug.Log("- Allocated memory by Unity: " + Profiler.GetTotalAllocatedMemoryLong() + "Bytes"); Debug.Log("- Reserved but not allocated: " + Profiler.GetTotalUnusedReservedMemoryLong() + "Bytes"); } }

    Web Proxy Viewer  |  New URL  |  Original Page