From f7513f0b1f3a50095e8c680edffb4f7cb4fd97da Mon Sep 17 00:00:00 2001 From: agatimu77 <38417159+agatimu77@users.noreply.github.com> Date: Thu, 9 Mar 2023 13:20:00 +0100 Subject: [PATCH] Update Simulation.cs Running the compile shader code from the update() instead of fixedupdate makes a big performance improvement. --- Assets/Scripts/Slime/Simulation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Slime/Simulation.cs b/Assets/Scripts/Slime/Simulation.cs index 61bc633..205ef19 100644 --- a/Assets/Scripts/Slime/Simulation.cs +++ b/Assets/Scripts/Slime/Simulation.cs @@ -110,7 +110,7 @@ void Init() } - void FixedUpdate() + void Update() { for (int i = 0; i < settings.stepsPerFrame; i++) {