Skip to content

Instantly share code, notes, and snippets.

@nekochanfood
Created June 11, 2023 13:35
Show Gist options
  • Save nekochanfood/e9465b438e684f1baffe96cc8829fe24 to your computer and use it in GitHub Desktop.
Save nekochanfood/e9465b438e684f1baffe96cc8829fe24 to your computer and use it in GitHub Desktop.
Time.timeScaleの値をスライダーでいじれるようにするスクリプト
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