Need help, part of unity inspector missing.

I am making a multiplayer game in unity using fusion.
My issue is the following.
This is what I am getting:
9757257--1397199--Capture1.PNG

But this is what I should be getting:

I am also receiving the following error:


"
ArgumentOutOfRangeException: No method found matching name “GetDrawerTypeForType”, signature “Fusion.Editor.UnityInternal+ScriptAttributeUtility+GetDrawerTypeForTypeDelegate”, flags “Static, NonPublic” and params: System.Type, candidates are
: Void ResetCachedTypesAndAsset()
UnityEditor.PropertyHandlerCache get_propertyHandlerCache()
Void set_propertyHandlerCache(UnityEditor.PropertyHandlerCache)
Void ClearGlobalCache()
Void PopulateBuiltinAttributes()
Void AddBuiltinAttribute(System.String, System.String, UnityEngine.PropertyAttribute)
System.Collections.Generic.List1[UnityEngine.PropertyAttribute] GetBuiltinAttributes(UnityEditor.SerializedProperty) System.Collections.Generic.Dictionary2[System.Type,UnityEditor.ScriptAttributeUtility+CustomPropertyDrawerContainer[ ]] BuildDrawerTypeForTypeDictionary()
System.Type GetDrawerTypeForType(System.Type, Boolean)
Int32 CalculateInheritanceLevel(System.Type, Int32, System.Collections.Generic.Dictionary2[System.Type,System.Int32]) Boolean TryGetDrawerTypeForTypeFromCache(Boolean, Boolean, System.Type, System.Type ByRef) Boolean TryExtractDrawerTypeForTypeFromCache(Boolean, Boolean, System.Type, System.Type ByRef) Boolean TryFindDrawers(CustomPropertyDrawerContainer[ ], CustomPropertyDrawerContainer ByRef) System.Type GetDrawerTypeForPropertyAndType(UnityEditor.SerializedProperty, System.Type) System.Collections.Generic.List1[UnityEngine.PropertyAttribute] GetFieldAttributes(System.Reflection.FieldInfo)
System.Reflection.FieldInfo GetFieldInfoAndStaticTypeFromProperty(UnityEditor.SerializedProperty, System.Type ByRef)
System.Reflection.FieldInfo GetFieldInfoFromProperty(UnityEditor.SerializedProperty, System.Type ByRef)
Boolean GetTypeFromManagedReferenceFullTypeName(System.String, System.Type ByRef)
System.Type GetScriptTypeFromProperty(UnityEditor.SerializedProperty)
System.Reflection.FieldInfo GetFieldInfoFromPropertyPath(System.Type, System.String, System.Type ByRef)
UnityEditor.PropertyHandler GetHandler(UnityEditor.SerializedProperty)
Boolean CanUseSameHandler(UnityEditor.SerializedProperty, UnityEditor.SerializedProperty)
System.Collections.Generic.List`1[System.Reflection.FieldInfo] GetAutoLoadProperties(System.Type)
Int32 g__AddOrReplaceInterfaceLevel|20_0(Int32, <>c__DisplayClass20_0 ByRef)
Boolean g__IsAppropriateDrawerFound|22_0(<>c__DisplayClass22_0 ByRef)
Parameter name: name
Fusion.Editor.ReflectionUtils.GetMethodOrThrow (System.Type type, System.String name, System.Reflection.BindingFlags flags, System.Type delegateType, Fusion.Editor.ReflectionUtils+DelegateSwizzle[ ] swizzles, Fusion.Editor.ReflectionUtils+DelegateSwizzle& firstMatchingSwizzle) (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:10841)
Fusion.Editor.ReflectionUtils.GetMethodOrThrow (System.Type type, System.String name, System.Reflection.BindingFlags flags, System.Type delegateType) (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:10768)
Fusion.Editor.ReflectionUtils.CreateMethodDelegateInternal (System.Type type, System.String name, System.Reflection.BindingFlags flags, System.Type delegateType) (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:10763)
Fusion.Editor.ReflectionUtils.CreateMethodDelegateInternal[T] (System.Type type, System.String name, System.Reflection.BindingFlags flags) (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:10759)
Fusion.Editor.ReflectionUtils.CreateMethodDelegate[T] (System.Reflection.Assembly assembly, System.String typeName, System.String methodName, System.Reflection.BindingFlags flags) (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:10511)
Rethrow as InvalidOperationException: UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.UnityEditor.ScriptAttributeUtility.GetDrawerTypeForType with flags: Static, NonPublic and type: Fusion.Editor.UnityInternal+ScriptAttributeUtility+GetDrawerTypeForTypeDelegate
Fusion.Editor.ReflectionUtils.CreateMethodDelegate[T] (System.Reflection.Assembly assembly, System.String typeName, System.String methodName, System.Reflection.BindingFlags flags) (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:10513)
Fusion.Editor.ReflectionUtils.CreateEditorMethodDelegate[T] (System.String editorAssemblyTypeName, System.String methodName, System.Reflection.BindingFlags flags) (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:10483)
Fusion.Editor.UnityInternal+ScriptAttributeUtility…cctor () (at Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs:11651)
Rethrow as TypeInitializationException: The type initializer for ‘ScriptAttributeUtility’ threw an exception.
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass72_0.b__0 () (at <1899c5bd2a6d466081cd705bee01d689>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)"

9757257--1397202--1373295-5462c046a5fe972c621b81fa990afdd1.png
9757257--1397205--1373301-4f5990a549045c7b19a26056cc9d32d1.png

2 Likes

I’m hitting the same issue. If you’re following the Fusion 100 guide Fusion 2 1 - Getting Started | Photon Engine it mentions installing com.unity.mono.cecil, have you done that? And if so, does it fix the issue?

yea i did that, it didnt work

The issue occur on unity 2022.3.23. It is NOT occuring on 2022.3.21.
Similar issue: Cannot open PhotonAppSettings on 2022.3.23f1 · Issue #21 · oculus-samples/Unity-Discover · GitHub

Photon discord: Discord

tl;dr: photon has a fix in progress

1 Like

Have they released an update yet or posted a temporary workaround? I don’t have access to that channel

The recommendation is to downgrade to Unity 2022.3.21 until they release a fix. No ETA at the moment.

2 Likes

@michielproce @davidborbis The fix is available - check the new quantum version 2.1.8.1

The fix is only available for Quantum but not for Fusion…

2 Likes

This issue sucks. Please fix

found a solution:
Add bool isPropertyTypeAManagedReference = false to the script at “Assets/Photon/Fusion/Scripts/Editor/Fusion.Editor.cs”

although a more delecate solution would be

#if UNITY_2022_3_25
      public delegate Type GetDrawerTypeForTypeDelegate(Type type, bool isPropertyTypeAManagedReference = false);
#else
      public delegate Type GetDrawerTypeForTypeDelegate(Type type);
#endif

(replace the unity version with your current one)

16 Likes

Yes!! The above post worked, but it was different for me using Fusion 2.0.0 and Unity 2023.2.19f. I noticed the error was about a legacy version of GetDrawerTypeForTypeDelegate, so I went to line 6586 of Fusion.Unity.Editor.cs (Found in the Engine folder not the Script folder for me) and changed the line from this:
private delegate Type LegacyGetDrawerTypeForTypeDelegate(Type type);

to this:

private delegate Type LegacyGetDrawerTypeForTypeDelegate(Type type, bool isPropertyTypeAManagedReference = false);

Now my networked components work and I can use the project with multiplayer again!

8 Likes

Thanks @Pk125 your solution worked for me.

Thanks @Pk125 it’s work for me.

Thanks @Pk125 it’s work for me too.

It’s fixed in the latest Quantum version 2.1.8.1

yeah that worked for me too!

Thank you.

How did you find this though? the file has 10K plus lines of code…

Thanks for this!

@GamerRealities Had the fix I needed for Fusion 2.0