1
votes

after downloading and importing cardboard sdk for unity i got these errors. i searched about error CS0246 but answers aren't able to solve it. or i am not getting any typo mistake. i haven't changed any single word in code provided by google. its on windows 7 and for android and i am using unity 4.3. any suggestions?

Assets/Cardboard/Scripts/Cardboard.cs(420,4): error CS0246: The type or namespace name `Tooltip' could not be found. Are you missing a using directive or an assembly reference

Assets/Cardboard/Scripts/StereoController.cs(87,4): error CS0246: The type or namespace name `TooltipAttribute' could not be found. Are you missing a using directive or an assembly reference?![enter image description here][1]

1

1 Answers

0
votes

You can't update Unity to the latest 4.6? I think Tooltip is the new feature of Unity 4.5. So, how about the solution?

http://answers.unity3d.com/questions/37177/additional-information-on-mouseover-in-the-inspect.html

Assets/Scripts/TooltipAttribute.cs:

using UnityEngine;

public class TooltipAttribute : PropertyAttribute
{
   public readonly string text;

   public TooltipAttribute(string text)
   {
       this.text = text;
   }
}

Assets/Editor/TooltipDrawer.cs:

using UnityEditor;
using UnityEngine;

[CustomPropertyDrawer(typeof(TooltipAttribute))]
public class TooltipDrawer : PropertyDrawer
{
    public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label)
    {
        var atr = (TooltipAttribute) attribute;
        var content = new GUIContent(label.text, atr.text);
        EditorGUI.PropertyField(position, prop, content);
    }
}

Now you can use Tooltip in Unity 4.3. I guess.