- Home /
Ambiguous Reference UnityEngine.Debug and System.Diagnostics.Debug
I'm using the System.Diagnostics Library to start an external process in unityscript.
When the compiler sees Debug it gives an Ambiguous Reference error because it is gets confused whether it's the Debug from System.Diagnostics or UnityEngine.
Is there a way to tell it the compiler that Debug.Log is UnityEngine.Debug.Log in unityscript. I saw an answer for c# posted in the forum but it does not work for unityscript.
using UnityEngine;
using System.Collections;
using System.Diagnostics;
using Debug = UnityEngine.Debug;
I tried replacing using with import but it still didn't work.
Answer by jgodfrey · Feb 19, 2016 at 10:51 PM
Not sure about the UnityScript, but alternatively you could...
Not add "using System.Diagnostics;' to your code so Debug.Log works as expected.
Just reference "System.Diagnostics.Process" where you need it.
Answer by codeman_nz · Feb 21, 2016 at 10:10 AM
I have the same issue. Unfortunately you need to use UnityEngine.Debug each time.