Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity time scale

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Update() {
        if (Input.GetButtonDown("Fire1")) {
            if (Time.timeScale == 1.0F)
                Time.timeScale = 0.7F;
            else
                Time.timeScale = 1.0F;
            Time.fixedDeltaTime = 0.02F * Time.timeScale;
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: primitive types c# 
Csharp :: autofac .net core 6 
Csharp :: how to create function in c# 
Csharp :: entity framework delete record with foreign key constraint 
Csharp :: asp.net format datetime 
Csharp :: how to show process time run c# 
Csharp :: string substring c# before 
Csharp :: how to reload app.config file at runtime in c# 
Csharp :: c# override gethashcode 
Csharp :: how to generate a random number in c# 
Csharp :: How to add rigidbody as a variable 
Csharp :: c# string methods 
Csharp :: c# get distinct values all fields from list 
Csharp :: how to display array in string in c# 
Csharp :: using in c# 
Csharp :: C# int array initial values 
Csharp :: concatenation in c# 
Csharp :: c# unit test for throwing exception method 
Csharp :: registry keys and values 
Csharp :: div element position in screen 
Csharp :: c# setting window size 
Csharp :: c# null conditional 
Csharp :: constructor in c# 
Csharp :: listview inter thread operation not valid 
Csharp :: unique field in class model .net core 
Csharp :: multiply structs c# 
Csharp :: speech 
Csharp :: Comparing Arrays using LINQ in C# 
Csharp :: request a pricipal permission 
Csharp :: .net mvc foreach index 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =