Method Auto
Auto(TP1, TP2, TP3)
Use to profile a piece of code enclosed within using statement.
Declaration
public ProfilerMarker<TP1, TP2, TP3>.AutoScope Auto(TP1 p1, TP2 p2, TP3 p3)
Parameters
Type | Name | Description |
---|---|---|
TP1 | p1 | The first context parameter. |
TP2 | p2 | The second context parameter. |
TP3 | p3 | The third context parameter. |
Returns
Type | Description |
---|---|
ProfilerMarker<TP1, TP2, TP3>.AutoScope | IDisposable struct which calls End on Dispose. |
Remarks
Returns null in Release Players.
Examples
using (profilerMarker.Auto(enemies.Count, blastRadius, blastPos.x))
{
var blastRadius2 = blastRadius * blastRadius;
for (int i = 0; i < enemies.Count; ++i)
{
var r2 = (enemies[i].Pos - blastPos).sqrMagnitude;
if (r2 < blastRadius2)
enemies[i].Dispose();
}
}