Struct ThreadIdentifier
Individual Thread details
Namespace: UnityEditor.Performance.ProfileAnalyzer
Syntax
public struct ThreadIdentifier
Constructors
ThreadIdentifier(String)
Initialise ThreadIdentifier from a unique name
Declaration
public ThreadIdentifier(string threadNameWithIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| String | threadNameWithIndex | The unique name string (name with index) |
ThreadIdentifier(String, Int32)
Initialise ThreadIdentifier
Declaration
public ThreadIdentifier(string name, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The thread name |
| Int32 | index | The thread index |
ThreadIdentifier(ThreadIdentifier)
Initialise ThreadIdentifier from another ThreadIdentifier
Declaration
public ThreadIdentifier(ThreadIdentifier threadIdentifier)
Parameters
| Type | Name | Description |
|---|---|---|
| ThreadIdentifier | threadIdentifier | The other ThreadIdentifier |
Fields
kAll
Thread index id which means all threads of the same name
Declaration
public static int kAll
Field Value
| Type | Description |
|---|---|
| Int32 |
kSingle
Thread index id use when there is only one thread with this name
Declaration
public static int kSingle
Field Value
| Type | Description |
|---|---|
| Int32 |
Properties
index
Thread index. A 1 based id for threads with matching names. -1 indicates all threads with the same name, 0 if there is only one thread with this name
Declaration
public int index { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
name
Thread name (may not be unique)
Declaration
public string name { get; }
Property Value
| Type | Description |
|---|---|
| String |
threadNameWithIndex
Thread name with index combined. A profiler analyzer specific unique thread representation
Declaration
public string threadNameWithIndex { get; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
SetAll()
Sets the index to indicate we want all threads (used for filtering against other ThreadIdentifiers)
Declaration
public void SetAll()
SetIndex(Int32)
Set the index of the thread name
Declaration
public void SetIndex(int newIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | newIndex | The index of the thread with the same name |
SetName(String)
Set the name of the thread
Declaration
public void SetName(string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | newName | The name (without index) |