Add SlowMo in unity game tutorial | Game Pause logic
Channel:
Subscribers:
1,110
Published on ● Video Link: https://www.youtube.com/watch?v=MXOoqtOLVcI
Code :
/*
By default Time.timeScale=1.0
When timeScale is 1.0, time passes as fast as real time.
When timeScale is 0.5 time passes 2x slower than
realtime.
When timeScale is 0 your application acts as if paused
*/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SlowMoManager : MonoBehaviour
{
public float valueToSet;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
Time.timeScale = valueToSet;
}
}
Other Videos By Muhammad Shahzaib
Tags:
unity
unity3d
unity2d
learn unity
unity tutorials
slow mo in unity
play pause logic in unity
add slow mo effect in unity
unity Time.timeScale