This file contains 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 UnityEngine; | |
public abstract class Singleton<T> : MonoBehaviour where T: MonoBehaviour | |
{ | |
private static T _instance; | |
// Property to access the instance | |
public static T Instance | |
{ | |
get |
This file contains 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
#if UNITY_EDITOR | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEditor.SceneManagement; | |
using UnityEngine; | |
// Drop this in your project; Since this uses UnityEditor, make sure to place it under an Editor directory. | |
namespace Game.Editor.SceneInspectorTool |
This file contains 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.Generic; | |
using UnityEngine; | |
// Drop this in your scene for easy time slowdown. | |
// Make time go faster when cliclking right arrow, slower when clicking the left arrow, and pause (and unpause) when clicking on Z. | |
// If *4 is not fast enough, you can add it to the list. | |
public class TimeScaleController : MonoBehaviour | |
{ | |
[SerializeField] private bool _enabled; |