Skip to content

Commit

Permalink
Add a really handy profiler call
Browse files Browse the repository at this point in the history
  • Loading branch information
siimav committed Oct 15, 2024
1 parent 72a916d commit aa2bbe0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/RealAntennasProject/Network/RACommNetNetwork.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using UnityEngine;
using CommNet;
using UnityEngine.Profiling;

namespace RealAntennas.Network
{
Expand Down Expand Up @@ -79,6 +80,7 @@ protected override void Update()

protected virtual void UpdateEarly()
{
Profiler.BeginSample("RA UpdateEarly");
var RACN = commNet as RACommNetwork;
if (requestInit)
{
Expand All @@ -98,6 +100,7 @@ protected virtual void UpdateEarly()
prevUpdate = tm;
graphDirty = queueRebuild = false;
}
Profiler.EndSample();
}

protected override void OnDestroy()
Expand Down

0 comments on commit aa2bbe0

Please sign in to comment.