참고> Unity 2022 버전 이후로는 나타나지 않는 문제입니다.
My Unity Version: [2021.1.10f1]
현재 2021 Unity Version에서 Visual Script를 실행하면 다음과 같은 에러가 발생됩니다.
--------- Error Message ---------
Failed to fetch inherited attributes on Unity.Plastic.Antlr3.Runtime.Tree.CommonTree.
System.TypeLoadException: Could not load type Antlr.Runtime.Tree.AntlrRuntime_BaseTreeDebugView while decoding custom attribute: (null)
at (wrapper managed-to-native) System.MonoCustomAttrs.GetCustomAttributesInternal(System.Reflection.ICustomAttributeProvider,System.Type,bool)
at System.MonoCustomAttrs.GetCustomAttributesBase (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inheritedOnly) [0x00013] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) [0x002b3] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.RuntimeType.GetCustomAttributes (System.Type attributeType, System.Boolean inherit) [0x00038] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Attribute.GetCustomAttributes (System.Reflection.MemberInfo element, System.Boolean inherit) [0x00052] in <695d1cc93cca45069c528c15c9fdd749>:0
at Unity.VisualScripting.AttributeUtility+AttributeCache..ctor (System.Reflection.MemberInfo element) [0x0002c] in D:\ProjectsDev\001 Purple Ocean Git\8 Visual Script Tutorial\Visual Script Tutorial\Library\PackageCache\com.unity.visualscripting@1.6.1\Runtime\VisualScripting.Core\Reflection\AttributeUtility.cs:56
UnityEngine.Debug:LogWarning (object)
Unity.VisualScripting.AttributeUtility/AttributeCache:.ctor (System.Reflection.MemberInfo) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Runtime/VisualScripting.Core/Reflection/AttributeUtility.cs:66)
Unity.VisualScripting.AttributeUtility:GetAttributeCache (System.Reflection.MemberInfo) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Runtime/VisualScripting.Core/Reflection/AttributeUtility.cs:266)
Unity.VisualScripting.AttributeUtility:HasAttribute<Unity.VisualScripting.SerializedPropertyProviderAttribute> (System.Reflection.MemberInfo,bool) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Runtime/VisualScripting.Core/Reflection/AttributeUtility.cs:337)
Unity.VisualScripting.SingleDecoratorProvider`3/<>c<System.Type, Unity.VisualScripting.ISerializedPropertyProvider, Unity.VisualScripting.SerializedPropertyProviderAttribute>:<MapAttributeTypes>b__9_0 (System.Type) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Decorators/SingleDecoratorProvider.cs:57)
System.Linq.Enumerable/WhereEnumerableIterator`1<System.Type>:MoveNext ()
Unity.VisualScripting.SingleDecoratorProvider`3<System.Type, Unity.VisualScripting.ISerializedPropertyProvider, Unity.VisualScripting.SerializedPropertyProviderAttribute>:MapAttributeTypes () (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Decorators/SingleDecoratorProvider.cs:57)
Unity.VisualScripting.SingleDecoratorProvider`3<System.Type, Unity.VisualScripting.ISerializedPropertyProvider, Unity.VisualScripting.SerializedPropertyProviderAttribute>:.ctor () (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Decorators/SingleDecoratorProvider.cs:23)
Unity.VisualScripting.SerializedPropertyProviderProvider:.ctor ()
Unity.VisualScripting.SerializedPropertyProviderProvider:.cctor () (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/SerializedProperties/SerializedPropertyProviderProvider.cs:37)
Unity.VisualScripting.InspectorProvider:CustomPropertyDrawerInspector (System.Type) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Inspection/InspectorProvider.cs:148)
Unity.VisualScripting.InspectorProvider:ResolveDecoratorType (System.Type) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Inspection/InspectorProvider.cs:42)
Unity.VisualScripting.SingleDecoratorProvider`3<Unity.VisualScripting.Metadata, Unity.VisualScripting.Inspector, Unity.VisualScripting.InspectorAttribute>:TryGetDecoratorType (System.Type,System.Type&) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Decorators/SingleDecoratorProvider.cs:85)
Unity.VisualScripting.SingleDecoratorProvider`3<Unity.VisualScripting.Metadata, Unity.VisualScripting.Inspector, Unity.VisualScripting.InspectorAttribute>:GetDecoratorType (System.Type) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Decorators/SingleDecoratorProvider.cs:104)
Unity.VisualScripting.InspectorProvider:HasInspector (System.Type) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Inspection/InspectorProvider.cs:158)
Unity.VisualScripting.InspectorProvider:GetDecoratedType (Unity.VisualScripting.Metadata) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Inspection/InspectorProvider.cs:31)
Unity.VisualScripting.SingleDecoratorProvider`3<Unity.VisualScripting.Metadata, Unity.VisualScripting.Inspector, Unity.VisualScripting.InspectorAttribute>:CreateDecorator (Unity.VisualScripting.Metadata) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Decorators/SingleDecoratorProvider.cs:42)
Unity.VisualScripting.SingleDecoratorProvider`3<Unity.VisualScripting.Metadata, Unity.VisualScripting.Inspector, Unity.VisualScripting.InspectorAttribute>:GetDecorator (Unity.VisualScripting.Metadata) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Decorators/SingleDecoratorProvider.cs:251)
Unity.VisualScripting.XInspectorProvider:Inspector (Unity.VisualScripting.Metadata) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Inspection/InspectorProvider.cs:174)
Unity.VisualScripting.LudiqGUI:GetInspectorHeight (Unity.VisualScripting.Inspector,Unity.VisualScripting.Metadata,single,UnityEngine.GUIContent) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Interface/LudiqGUI.cs:77)
Unity.VisualScripting.VariablesEditor:GetHeight (single,UnityEngine.GUIContent) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Variables/VariablesEditor.cs:14)
Unity.VisualScripting.Inspector:GetCachedHeight (single,UnityEngine.GUIContent,Unity.VisualScripting.Inspector) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Inspection/Inspector.cs:228)
Unity.VisualScripting.Inspector:GetLayoutPosition (UnityEngine.GUIContent,single,UnityEngine.RectOffset) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Inspection/Inspector.cs:317)
Unity.VisualScripting.Inspector:DrawLayout (UnityEngine.GUIContent,single,UnityEngine.RectOffset) (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Inspection/Inspector.cs:322)
Unity.VisualScripting.LudiqRootObjectEditor/Individual:OnGUI () (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Inspection/Root/LudiqRootObjectEditor.cs:52)
Unity.VisualScripting.OptimizedEditor`1<Unity.VisualScripting.LudiqRootObjectEditor/Individual>:OnInspectorGUI () (at Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Core/Inspection/OptimizedEditor.cs:31)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
이는 Unity에 기본적으로 설치된 "Version Control" 기능과 충돌이 나기 때문입니다.
이를 해결하기 위해서는 Version Control을 제거(Remove)하면 됩니다.
Version Control은 Unity "Collaborate" 기능과 "Plastic SCM"을 이용하는 것과 관련이 됩니다. 위 기능을 이미 아시는 분이라면 스스로 판단하시면 되지만 그렇지 않다면 사용할 일이 없을 듯 합니다. 게임 또는 앱을 만드는 유니티 본연의 기능과는 무관하고 팀작업을하거나 파일 관리를 지원하는 것인데 대부분 git이나 SVN을 사용할 가능성이 높고 개인 프로젝트라면 굳이 필요치 않습니다. 과감히 삭제하셔도 무관합니다.
"Unity > Window > Package Manager"에서 Version Control을 찾아 우측 하단의 "Remove"버튼을 눌러 제거해주세요.
유니티가 업데이트되면서 언젠가는 위 문제가 해결이 되지 않을까 싶습니다.
'VS 처음' 카테고리의 다른 글
비주얼 스크립팅 에디터 및 단축키 설정 (0) | 2021.08.04 |
---|---|
비주얼 스크립팅의 구성 옵션 (0) | 2021.08.03 |
비주얼 스크립팅 소개 (0) | 2021.08.03 |
VS Editor 소개 (0) | 2021.07.30 |
유니티 비주얼 스크립팅(Unity Visual Scripting) 시작하기 (0) | 2021.07.23 |