Hi, I would like to know how to make the SerializeField in the Ispector for Scenes.
It´s easy way to make it or it is harder? My code is know functional, but I must write the name of scene… I would like to drag and drop the scene…
LoadLevel couldn´t be a string, but object…but that´s not all…(I try ToString() )
And I didn´t find some command to take a name of the object. Exists?
My english is not so good…
Thanks
public class LoseCollider : MonoBehaviour {
[SerializeField] string LoadLevel;
private void OnTriggerEnter2D(Collider2D collision)
{
Debug.Log("scene: " + LoadLevel);
SceneManager.LoadScene(LoadLevel);
}
}