Created
June 11, 2023 13:35
-
-
Save nekochanfood/e9465b438e684f1baffe96cc8829fe24 to your computer and use it in GitHub Desktop.
Time.timeScaleの値をスライダーでいじれるようにするスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class TimeScaleSlider : MonoBehaviour | |
{ | |
[SerializeField, Range(0.0f, 2.0f)] float Time = 1.0f; | |
private void Update() | |
{ | |
UnityEngine.Time.timeScale = Time; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment