Skip to content

Commit 6896cb3

Browse files
committed
wrap EmitFrame in AgentManager for Editor Performance
Wrapping the EmitFrame coroutine to only execute when not in editor to save performance in editor. -note: This editor define was added in the ExpRoom branch, and would be included when that is merged but for now I'm adding it for the sake of usability on the Master branch until the ExpRoom update is live.
1 parent 8f9a1c2 commit 6896cb3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

unity/Assets/Scripts/AgentManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ void Start()
120120
primaryAgent.actionDuration = this.actionDuration;
121121
// this.agents.Add (primaryAgent);
122122
physicsSceneManager = GameObject.Find("PhysicsSceneManager").GetComponent<PhysicsSceneManager>();
123+
#if !UNITY_EDITOR
123124
StartCoroutine (EmitFrame());
125+
#endif
124126
}
125127

126128
private void initializePrimaryAgent()

0 commit comments

Comments
 (0)