Problems with Standard Assets in Zombie Runner

I’m having issues with some of the standard assets downloaded as instructed, apparently some of the “GUIText” code is obsolete and the script involving changing camera (that so far we are not using, maybe I’m wrong.) This has unfortunately halted my progress, I have been going through unity documents trying to find the solution but I cant find anything that seems applicable.

1 Like

Hi John,

Did you import all Standard Assets? Some of them are heavily outdated. For this reason, it is recommended to only download the assets we need.

If you just have an error message regarding GUIText, double click on it and follow the instruction that comes with the error message. Of course, I don’t know what you see in Unity, so this is just a guess.

Did this help?


See also:

Not really, that is what I did already, I followed the instructions to the letter only adding those they mentioned, when I tried to leave this out I got over a hundred other errors saying they are now missing a reference.

What exactly did you do? Could you share the relevant piece of code here?

And in which script did the problem occur? Maybe there is an alternative solution for the Standard Assets. If you use CrossPlatformInput, you could simply use Unity’s built-in Input class. Then you could remove all Standard Assets.

I’ve done nothing other than import the assets and try to find a solution, the line goes
public GUIText camSwitchButton;
also, most of the pages on the subject either say their info and the code is outdated.

I don’t know what error message you got but if it is what I think it is, you’ll have to do this:

using Unity.UI;

public Text camSwitchButton;

And you will have to replace all GUIText types in the code with Text.

This has only put up other errors, it doesn’t recognize the namespace, its asking if I’m missing an assembly reference, wouldn’t that be the

using Unity.UI;

part?

Same as John - Imported the assets as shown in the video and immediately getting the error
Assets\Standard Assets\Utility\SimpleActivatorMenu.cs(11,16): error CS0619: ‘GUIText’ is obsolete: ‘GUIText has been removed. Use UI.Text instead.’

When trying to add the using Unity.UI; part to the top, it does bring up

Assets\Standard Assets\Utility\SimpleActivatorMenu.cs(12,16): error CS0246: The type or namespace name ‘Text’ could not be found (are you missing a using directive or an assembly reference?)

Tried changing it to UI.Text, as advised by the first message - no luck.

Ah, found the issue:
add using UnityEngine.UI;
rather than
Unity.UI;

This will allow the use of the Text camSwitchButton;

1 Like

Thank you so much! This finally fixed the problem allowing me to do the lesson!

Good grief, you are absolutely right, @MarkusC_F. I knew Unity.UI looked somehow off. Thanks for sharing your solution. :slight_smile:

@John_Boehm, sorry for the confusion. I made a typo. I’m glad Markus knew the correct answer.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms