Guitext - остарял потребителски интерфейс.вместо това текст

Примерен код

6
0

грешка CS0619: GUIText актуално: GUIText е бил изтрит. Използвайте потребителския интерфейс.Вместо това напиши.

/*Add at the beginning of the code:*/
using UnityEngine.UI;
/*then replace GUIText with Text*/
0
0

guitext - остарял потребителски интерфейс.вместо това текст

Replace This Script with simple Activator Menu

using System;
using UnityEngine;
using UnityEngine.UI;
#pragma warning disable 618
namespace UnityStandardAssets.Utility
{
    public class SimpleActivatorMenu : MonoBehaviour
    {
        // An incredibly simple menu which, when given references
        // to gameobjects in the scene
        public Text camSwitchButton;
        public GameObject[] objects;


        private int m_CurrentActiveObject;


        private void OnEnable()
        {
            // active object starts from first in array
            m_CurrentActiveObject = 0;
            camSwitchButton.text = objects[m_CurrentActiveObject].name;
        }


        public void NextCamera()
        {
            int nextactiveobject = m_CurrentActiveObject + 1 >= objects.Length ? 0 : m_CurrentActiveObject + 1;

            for (int i = 0; i < objects.Length; i++)
            {
                objects[i].SetActive(i == nextactiveobject);
            }

            m_CurrentActiveObject = nextactiveobject;
            camSwitchButton.text = objects[m_CurrentActiveObject].name;
        }
    }
}
0
0

как да се определи за грешка CS0619: GUIText актуално: GUIText е бил изтрит. Използвайте потребителския интерфейс.Вместо това напиши.

/*Open the . cs file that Unity is indicating on the error (you can use any text editor for this, even notepad)
Insert*/
using UnityEngine. UI;
/*on the beggining of the . cs file.
Replace GUIText with just Text.*/

Подобни страници

Подобни страници с примери

На други езици

Тази страница на други езици

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Íslensk
..................................................................................................................