- Home /
Ambigous reference in GUIContent
first error:
Assets/6by7/ProGrids/Scripts/Editor/ProGrids_GUI.js(108,56): BCE0004: Ambiguous reference 'constructor': UnityEngine.GUIContent.constructor(UnityEngine.Texture, String), UnityEngi
Second error:
Assets/6by7/ProGrids/Scripts/Editor/ProGrids_GUI.js(114,55): BCE0004: Ambiguous reference 'constructor': UnityEngine.GUIContent.constructor(UnityEngine.Texture, String), UnityEngine.GUIContent.constructor(String, String).
Third error:
Assets/6by7/ProGrids/Scripts/Editor/ProGrids_GUI.js(120,55): BCE0004: Ambiguous reference 'constructor': UnityEngine.GUIContent.constructor(UnityEngine.Texture, String), UnityEngine.GUIContent.constructor(String, String).
It looks like the compiler can't figure out weather you are passing it a string or a texture. Try an explicit cast to the appropriate type in the appropriate line of code.
Can't get much more specific without actual code and a full stack trace.
Answer by sethuraj · Jul 29, 2014 at 06:17 AM
Ambiguous means u must have two or more classes,methods or something with the same name. Example
using UnityEngine;
using System.Collections;
using System;
public class Example : MonoBehaviour
{
public Object object_One;
/* Now this will throw an error saying - Object is an ambiguous reference between 'UnityEngine.Object' and 'System.Object' */
//Inorder to avoid this you have to use namespace specific
//For UnityEngine Object,use
public UnityEngine.Object UE_Object;
//For System Object,use
public System.Object Sys_Object
}
Your answer
Follow this Question
Related Questions
The type or namespace "Target" could not be found? 1 Answer
Can't download assets in unity asset store 0 Answers
Keep getting this error message,Hi whenever i open the editor i keep getting this error. 0 Answers
Error "OnTriggerEnter: this message has to be of type: Collider" 0 Answers
help fix error cs1518 1 Answer