Error message for GUITexture

I upgraded to 2020.2 and got the attached error message that I don’t know how to correct. Since I don’t know Unity very well, help would be appreciated.

As the errors state, GUITexture and GUIText have been removed and you should replace those with UI.Text and UI.Texture wherever they are used in your project. While you’re at it, you could check TextMeshPro, it offers more formatting options and is simple to use.

From what I can tell, A GUIText and Texture were old ways of writing text, which have now been removed. Unfortunately, I don’t know which text it was or where it was removed, so I don’t know how I would replace it.
Would it have been part of something larger, or in a folder? Thanks for your help!

Both are Components and you can find them in your scene by typing the name in the search box in your Hierarchy view. For each of those, remove the component, replace with Image and Text or whatever your choice. Then fix your scripts accordingly: you can find the script names in your error output.

Actually in this case looks like these are being referred to by some scripts under Standard Assets/Utility, and these might be 3rd party libraries? In this case depends on these libraries; update them to a newer version or if they are discontinued then you are out of luck and they are incompatible with a newer Unity.

You’re using outdated assets (the Standard Assets) that may no longer fully work in recent (and future) Editor versions without manually fixing these errors:
Standard Assets 2018 - let us know what you think! page-4#post-5458527

Unity indeed removed the GUITexture and GUIText components in 2019.3:

.

Thanks for helping me find ForcedReset.cs and SimpleActivatorMenu.cs.
However, I’m not sure what to do with them.
Deleting the ForcedReset.cs file made that error message go away.
But deleting SimpleActivatorMenu.cs caused a lot more error messages to appear, so I put it back in the folder.

Here’s the contents of SimpleActivatorMenu.cs:

using System;
using UnityEngine;

namespace UnityStandardAssets.Utility
{
public class SimpleActivatorMenu : MonoBehaviour
{
// An incredibly simple menu which, when given references
// to gameobjects in the scene
public GUIText 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*.SetActive(i == nextactiveobject);*
}
m_CurrentActiveObject = nextactiveobject;
camSwitchButton.text = objects[m_CurrentActiveObject].name;
}
}
}

Mauri, your answer didn’t appear until I posted my response to JaakkOS , so I’ll study what you had to say now.

You need to know what those scripts are. If you delete them, I think your forced reset and activator menu functionalities will break. So your real goal is to replace those functionalities and at to do this in the way of replacing those outdated scripts.

For the file SimpleActivatorMenu.cs, I learned from a video (

) that all I had to do is add “using UnityEngine.UI;” and change “GUIText” to “Text” in the file.

Is there something as simple that I can do with ForcedReset.cs:

using System;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityStandardAssets.CrossPlatformInput;

[RequireComponent(typeof (GUITexture))]
public class ForcedReset : MonoBehaviour
{
private void Update()
{
// if we have forced a reset …
if (CrossPlatformInputManager.GetButtonDown(“ResetObject”))
{
//… reload the scene
SceneManager.LoadScene(SceneManager.GetSceneAt(0).name);
}
}
}

I found another video by the same guy about the error message for GUITexture in ForcedReset.cs

He said simply replace GUITexture with UnityEngine.UT.Image

I did and the error went away, but new ones appeared complaining that my WebVRController has a problem because ‘XRDevice.isPresent’ is obsolete.

Is that because I fixed the ForcedReset problem causing this problem?

Two steps forward, one step backward!

Look you can’t just “click a button to switch to new Unity and everything will magically work”. Why are you upgrading in the first place? Stay in the old version if you don’t want to or don’t know how to replace libraries that are declared obsolete in the new version. And I don’t mean offense by this; I stayed in Ubuntu 14.04 when the latest was going somewhere in version 20… and that’s just cos I didn’t want to change my ways and things were working perfectly where I was at that point. You shouldn’t upgrade unless there’s a reason for it, and if you have that reason, then you need to take all the hassle that comes with it.