HELP getting errors for typing Debug.Log("Welcome to number wizard");

if anyone could help that would be epic

I tried to fix it by Deleting using System Diagnostics;
and it worked but when i tried to type another Debug.Log, the System Diagnostics came back!

Hi,

The error tells you that there is an ambiguous reference between two things, (UnityEngine.Debug and System.Diagnostics.Debug). This means that when you type Debug.Log, the compiler doesn’t know where to grab “Debug” from.

Try deleting all System imports from your code (I don’t think they’re used for anything right now), or if the problem persists, add:

using UnityEngine.Debug;

Hi OWen1,

Welcome to our community! :slight_smile:

Does MonoBehaviour have the same colour as your classname? If not, there might be a problem with Visual Studio. Please watch lecture “Fixing Visual Studio Problems” (currently #4).


See also:

1 Like

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

Privacy & Terms