Skip to content

Commit 5289e7c

Browse files
committed
fix: Fixed MissingMethodException when using Unity 2021
1 parent 66810c1 commit 5289e7c

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

GenericUnityEditorInternals.dll

0 Bytes
Binary file not shown.

GenericUnityInternals~/GenericUnityEditorInternals/GenericUnityEditorInternals.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
<Reference Include="System.Core" />
4040
<Reference Include="System.Xml" />
4141
<Reference Include="UnityEngine.CoreModule">
42-
<HintPath>C:\Program Files\Unity Editors\2020.2.4f1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll</HintPath>
42+
<HintPath>C:\Program Files\Unity Editors\2021.1.3f1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll</HintPath>
4343
</Reference>
4444
<Reference Include="UnityEditor.CoreModule">
45-
<HintPath>c:\Program Files\Unity Editors\2020.2.4f1\Editor\Data\Managed\UnityEngine\UnityEditor.CoreModule.dll</HintPath>
45+
<HintPath>c:\Program Files\Unity Editors\2021.1.3f1\Editor\Data\Managed\UnityEngine\UnityEditor.CoreModule.dll</HintPath>
4646
</Reference>
4747
<Reference Include="UnityEngine.IMGUIModule">
48-
<HintPath>c:\Program Files\Unity Editors\2020.2.4f1\Editor\Data\Managed\UnityEngine\UnityEngine.IMGUIModule.dll</HintPath>
48+
<HintPath>c:\Program Files\Unity Editors\2021.1.3f1\Editor\Data\Managed\UnityEngine\UnityEngine.IMGUIModule.dll</HintPath>
4949
</Reference>
5050
<Reference Include="GenericUnityObjects">
5151
<HintPath>..\..\..\..\Library\ScriptAssemblies\GenericUnityObjects.dll</HintPath>

GenericUnityInternals~/GenericUnityEditorInternals/ObjectFieldHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ internal readonly struct ObjectFieldHelper
1414
{
1515
public readonly Type ObjType;
1616
public readonly Object CurrentTarget;
17-
17+
1818
private static readonly GUIContent _cachedContent = new GUIContent();
1919

2020
private readonly SerializedProperty _property;
@@ -52,7 +52,7 @@ public GUIContent GetObjectFieldContent(Object obj, string niceTypeName)
5252
return EditorGUIUtility.TempContent($"None ({niceTypeName})");
5353

5454
_cachedContent.text = $"{obj.name} ({niceTypeName})";
55-
_cachedContent.image = EditorGUIUtility.GetSkinnedIcon(AssetPreview.GetMiniThumbnail(obj));
55+
_cachedContent.image = AssetPreview.GetMiniThumbnail(obj);
5656

5757
if (_property == null)
5858
return _cachedContent;

GenericUnityInternals~/GenericUnityEditorInternals/ObjectSelectorExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static void ShowGeneric(this ObjectSelector this_, Object obj, Object obj
6767
this_.m_ModalUndoGroup = Undo.GetCurrentGroup();
6868

6969
// Show custom selector if available
70-
if (UnityEditor.SearchService.ObjectSelector.HasEngineOverride())
70+
if (ObjectSelectorSearch.HasEngineOverride())
7171
{
7272
this_.m_SearchSessionHandler.BeginSession(() =>
7373
{
@@ -117,7 +117,7 @@ void OnSelectorClosed(Object selectedObj, bool canceled)
117117
this_.NotifySelectorClosed(false);
118118
}
119119

120-
if (UnityEditor.SearchService.ObjectSelector.SelectObject(searchContext, OnSelectorClosed, OnSelectionChanged))
120+
if (ObjectSelectorSearch.SelectObject(searchContext, OnSelectorClosed, OnSelectionChanged))
121121
return;
122122
}
123123

0 commit comments

Comments
 (0)