How to Fix 'GUIText' is obsolete: 'GUIText has been removed. Use UI.Text instead.' - Unity Error

This error can be fixed by changing 'GUIText' to 'Text'. Don't forget to import the UnityEngine.UI too.

code before :
		
using UnityEngine;

namespace UnityStandardAssets.Utility
{
    public class SimpleActivatorMenu : MonoBehaviour
    {
        public GUIText camSwitchButton;
		
	
code after :
		
using UnityEngine;
using UnityEngine.UI;

namespace UnityStandardAssets.Utility
{
    public class SimpleActivatorMenu : MonoBehaviour
    {
        public Text camSwitchButton;
		
	

Comments

Popular posts from this blog

Cara Mengatasi Error 'GUIText' is obsolete: 'GUIText has been removed. Use UI.Text instead.' - Unity Error

Cara Mengatasi Error 'GUITexture' is obsolete: 'GUITexture has been removed. Use UI.Image instead.' - Unity Error

How to Fix 'GUITexture' is obsolete: 'GUITexture has been removed. Use UI.Image instead.' - Unity Error