【发布时间】:2021-01-15 10:48:55
【问题描述】:
单击按钮时我需要开始一个新场景,但是当我单击它时 - 没有任何反应;有什么问题?
public class Options : MonoBehaviour
{
public Button button;
// Start is called before the first frame update
void LoadOptions()
{
button.GetComponent<Button>();
button.onClick.AddListener(LoadScene);
}
// loading scene
void LoadScene()
{
SceneManager.LoadScene("Options");
}
}
当我点击它时 - 什么也没有发生;有什么问题? 我在我的项目中添加了一个名为“Options”的场景。
【问题讨论】:
标签: c# android unity3d augmented-reality