Answers for "how to sleep wait unity c#"

C#
5

how to make a method wait in unity

public float timeLeft = 30.0f

void Update()
{
  timeLeft -= Time.deltaTime;
            if (timeLeft < 0)
            {
            //Do your method here
            }
}
Posted by: Guest on February-22-2021
2

how to pause physics in unity c#

Physics.autoSimulation = false;
Posted by: Guest on April-13-2020

C# Answers by Framework

Browse Popular Code Answers by Language