2014-12-18 2 views
1

Google Cardboard Unity SDK 가져 오기 오류가 발생했습니다. 이러한 오류가 발생했습니다. 내가 CS0246 오류에 대한 검색했지만 대답은 그것을 해결할 수 없습니다. 또는 오타가 발생하지 않았습니다. Google에서 제공하는 코드에서 한 단어도 변경하지 않았습니다. 그것의 창문 7 and android and unity 4.3을 사용하고 있습니다. 어떤 제안?골판지 sdk를 다운로드하고 가져온 후에

Assets/Cardboard/Scripts/Cardboard.cs (420,4) : 오류 CS0246 : 형식 또는 네임 스페이스 이름 '도구 설명'을 찾을 수 없습니다. using 지시문이나 어셈블리 참조가 누락되었습니다.

Assets/Cardboard/Scripts/StereoController.cs (87,4) : 오류 CS0246 : 형식 또는 네임 스페이스 이름 'TooltipAttribute'을 (를) 찾을 수 없습니다. 사용 지시문이나 어셈블리 참조가 누락 되었습니까? [[1]

답변

0

Unity를 최신 4.6으로 업데이트 할 수 없습니까? 툴팁은 Unity 4.5의 새로운 기능이라고 생각합니다. 그렇다면 해결책은 어떨까요?

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

자산/스크립트/TooltipAttribute.cs :

using UnityEngine; 

public class TooltipAttribute : PropertyAttribute 
{ 
    public readonly string text; 

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

자산/에디터/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); 
    } 
} 

이제 유니티 4.3에 도구 설명을 사용할 수 있습니다. 그렇 겠지.

관련 문제