I had a TextMashPro button to my project, and out code it to switch scene, but under the on click and function, it showed no functions
NextSceneScript Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class NextSceneScript : MonoBehaviour
{
public void NextScene()
{
SceneManager.LoadScene("Main");
}
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
I tried following your images but whenever I brought the gameObject with the script in to the button, and sets the function, it turns it back into a script and doesn’t work