FOR ANYONE IN 2024:
You can use it in Unity 2022.3, But there are some scripts you gotta fix before you hit playmode bc GUI is no longer a thing, here are the fixed scripts (NOTE: You will have to exit safe mode to install TMPro):
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI; // Use UnityEngine.UI for UI components
using UnityEngine.SceneManagement; // Required for SceneManager
using UnityStandardAssets.CrossPlatformInput; // Ensure you have the correct namespace
[RequireComponent(typeof(Image))] // Correct type
public class ForcedReset : MonoBehaviour
{
private void Update()
{
// if we have forced a reset ...
if (CrossPlatformInputManager.GetButtonDown("ResetObject"))
{
//... reload the scene
SceneManager.LoadScene(SceneManager.GetActiveScene().name); // Use GetActiveScene() for current scene
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
namespace UnityStandardAssets.Utility
{
public class SimpleActivatorMenu : MonoBehaviour
{
// An incredibly simple menu which, when given references
// to gameobjects in the scene
public TextMeshProUGUI camSwitchButton;
public GameObject[] objects;
private int m_CurrentActiveObject;
private void OnEnable()
{
// active object starts from first in array
m_CurrentActiveObject = 0;
camSwitchButton.text = objects[m_CurrentActiveObject].name;
}
public void NextCamera()
{
int nextactiveobject = m_CurrentActiveObject + 1 >= objects.Length ? 0 : m_CurrentActiveObject + 1;
for (int i = 0; i < objects.Length; i++)
{
objects[i].SetActive(i == nextactiveobject);
}
m_CurrentActiveObject = nextactiveobject;
camSwitchButton.text = objects[m_CurrentActiveObject].name;
}
}
}
Hope this is helpful :)