Egor Morozov
Ученик
(200),
на голосовании
4 месяца назад
Хотел проверить игру, но вылетает эта ошибка, но не знаю как ее решить: Assets\скрипты\Note.cs(3,19): error CS0234: The type or namespace name 'SceneManagement' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)
вот сам скрипт: using System.Collections; using System.Collections.Generic; using UnityEditor.SceneManagement; using UnityEngine; using UnityEngine.UI;
public class Note : MonoBehaviour { public string noteTextstr; public GameObject notice; public GameObject noteUI; public Text text; // Start is called before the first frame update void Start() {
}
// Update is called once per frame void Update() {
Assets\скрипты\Note.cs(3,19): error CS0234: The type or namespace name 'SceneManagement' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)
вот сам скрипт:
using System.Collections;
using System.Collections.Generic;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.UI;
public class Note : MonoBehaviour
{
public string noteTextstr;
public GameObject notice;
public GameObject noteUI;
public Text text;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnTriggerStay(Collider other)
{
text.text = noteTextstr;
if (Input.GetKey(KeyCode.E))
{
noteUI.SetActive(true);
}
if (Input.GetKey(KeyCode.T))
{
noteUI.SetActive(false);
}
notice.SetActive(true);
}
private void OnTriggerExit(Collider other)
{
notice.SetActive(false);
noteUI.SetActive(false);
}
}