Y
Y
yraiv2020-04-17 06:55:27
C++ / C#
yraiv, 2020-04-17 06:55:27

Scene loading not working, how to fix it?

The code doesn't work. Where did you make a mistake? He does not write problems, there are 2d colliders. Nothing happens on click

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class LoadScene : MonoBehavior
{

public int N;

public void OnMouseDown ()
{

SceneManager.LoadScene(N);

}

}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
yraiv, 2020-04-18
@yraiv

Didn't work through ui images, did the same, but through regular ones and everything went well

D
DanielMcRon, 2020-04-17
@DanielMcRon

Well, I'm 100% sure that no one has read the docs, but why is this needed, of course. File - Build Settings and there it will add a scene to Unity

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question