UnityEngine.Debug.Log

Hi all,

i have come with an issue that i cant find an answer. When i write Debug.Log i have to always write before it UnityEngine. Else it gives the following: error CS0104: ‘Debug’ is an ambiguous reference between ‘UnityEngine.Debug’ and 'System.Diagnostics.Debug
I am using Unity 2019.3.11f1.
Do i always have to write Unity… before Debug or there is a way to solve this issue?

H Dim_Kan,

can you please check that you have the UnityEngine namespace in your code?

image

2 Likes

First of all thank you for your immediate response.
Your question made me realise that by default Unity starts with these attributes (is this correct? I am tottaly new with C# or any other computer language to be true).

UnityEngine

So i deleted
System.Net and
System Diagnostics
Saved and everything works fine. Problem solved!

Thank you again for your help!

3 Likes

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

Privacy & Terms