docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ProfilerMarker<TP1, TP2>

    Use ProfilerMarker<TP1, TP2> to mark up script code blocks for the Unity Profiler.

    You can pass two integral or floating point parameters alongside the Begin event. The following types are supported as parameters:

    • int
    • uint
    • long
    • ulong
    • float
    • double
    Namespace: Unity.Profiling
    Assembly: solution.dll
    Syntax
    public struct ProfilerMarker<TP1, TP2> where TP1 : unmanaged where TP2 : unmanaged
    Type Parameters
    Name Description
    TP1

    Type of the first parameter.

    TP2

    Type of the second parameter.

    Constructors

    Name Description
    ProfilerMarker(string, string, string)

    Constructs the ProfilerMarker that belongs to the generic ProfilerCategory.Scripts category.

    ProfilerMarker(ProfilerCategory, string, string, string)

    Constructs a ProfilerMarker.

    Methods

    Name Description
    Auto(TP1, TP2)

    Profiles a piece of code enclosed within a using statement.

    Begin(TP1, TP2)

    Begins profiling a piece of code marked with the ProfilerMarker instance.

    End()

    Ends profiling a piece of code marked with the ProfilerMarker instance.

    In This Article
    Back to top
    Copyright © 2024 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)