docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ProfilerScope

    A Helper class for Profiler scoping

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Multiplayer.Tools.Common
    Assembly: Unity.Multiplayer.Tools.Common.dll
    Syntax
    public ref struct ProfilerScope

    Methods

    BeginSample(string)

    Static method returning a new ProfilerScope object and starting the sampling

    Declaration
    public static ProfilerScope BeginSample(string name)
    Parameters
    Type Name Description
    string name

    The name of the Profiler Sample

    Returns
    Type Description
    ProfilerScope

    The ProfilerScope object

    Dispose()

    Stopping the Profiler sampling on Disposal of the object (end of scope)

    Declaration
    public void Dispose()
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)