docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ProfilerMarker<TP1, TP2, TP3>

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

    You can pass three 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, TP3> where TP1 : unmanaged where TP2 : unmanaged where TP3 : unmanaged
    Type Parameters
    Name Description
    TP1

    Type of the first parameter.

    TP2

    Type of the second parameter.

    TP3

    Type of the third parameter.

    Constructors

    Name Description
    ProfilerMarker(string, string, string, string)

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

    ProfilerMarker(ProfilerCategory, string, string, string, string)

    Constructs a ProfilerMarker.

    Methods

    Name Description
    Auto(TP1, TP2, TP3)

    Use to profile a piece of code enclosed within using statement.

    Begin(TP1, TP2, TP3)

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

    End()

    End 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)