Ambiguous Debug Reference

Debug is an ambiguous reference between System.Diagnostics.Debug and UnityEngine.Debug. And The name Debug does not exist in the current context

He hecho un proyecto y cuando he actualizado el proyecto me han salido estos errores:

El codigo problematico seria este:

using UnityEngine;
using System.Diagnostics;

public static Vector2 ScreenToPixels(Vector2 pos, Transform relativeTo)
{
	int layer = relativeTo.gameObject.layer;
	Camera camera = NGUITools.FindCameraForLayer(layer);
	if (camera == null)
	{
		Debug.LogWarning("No camera found for layer " + layer);
		return pos;
	}
	Vector3 position = camera.ScreenToWorldPoint(pos);
	return relativeTo.InverseTransformPoint(position);
}

public static Vector2 ScreenToParentPixels(Vector2 pos, Transform relativeTo)
{
	int layer = relativeTo.gameObject.layer;
	if (relativeTo.parent != null)
	{
		relativeTo = relativeTo.parent;
	}
	Camera camera = NGUITools.FindCameraForLayer(layer);
	if (camera == null)
	{
		Debug.LogWarning("No camera found for layer " + layer);
		return pos;
	}
	Vector3 vector = camera.ScreenToWorldPoint(pos);
	return (!(relativeTo != null)) ? vector : relativeTo.InverseTransformPoint(vector);
} 
}

using UnityEngine;
using System.Diagnostics;
using Debug = UnityEngine.Debug;// ← this line fixes the issue