@@ -181,9 +181,7 @@ private static string ExtractGUIDFromString( string str )
181181 private readonly FieldInfoGetter fieldInfoGetter = ( FieldInfoGetter ) Delegate . CreateDelegate ( typeof ( FieldInfoGetter ) , typeof ( Editor ) . Assembly . GetType ( "UnityEditor.ScriptAttributeUtility" ) . GetMethod ( "GetFieldInfoAndStaticTypeFromProperty" , BindingFlags . Public | BindingFlags . NonPublic | BindingFlags . Static ) ) ;
182182 private readonly Func < Object > lightmapSettingsGetter = ( Func < Object > ) Delegate . CreateDelegate ( typeof ( Func < Object > ) , typeof ( LightmapEditorSettings ) . GetMethod ( "GetLightmapSettings" , BindingFlags . Public | BindingFlags . NonPublic | BindingFlags . Static ) ) ;
183183 private readonly Func < Object > renderSettingsGetter = ( Func < Object > ) Delegate . CreateDelegate ( typeof ( Func < Object > ) , typeof ( RenderSettings ) . GetMethod ( "GetRenderSettings" , BindingFlags . Public | BindingFlags . NonPublic | BindingFlags . Static ) ) ;
184- #if UNITY_2021_2_OR_NEWER
185184 private readonly Func < Cubemap > defaultReflectionProbeGetter = ( Func < Cubemap > ) Delegate . CreateDelegate ( typeof ( Func < Cubemap > ) , typeof ( RenderSettings ) . GetProperty ( "defaultReflection" , BindingFlags . Public | BindingFlags . NonPublic | BindingFlags . Static ) . GetGetMethod ( true ) ) ;
186- #endif
187185
188186 internal static readonly Func < SpriteAtlas , Sprite [ ] > spriteAtlasPackedSpritesGetter = ( Func < SpriteAtlas , Sprite [ ] > ) Delegate . CreateDelegate ( typeof ( Func < SpriteAtlas , Sprite [ ] > ) , typeof ( SpriteAtlasExtensions ) . GetMethod ( "GetPackedSprites" , BindingFlags . Public | BindingFlags . NonPublic | BindingFlags . Static ) ) ;
189187#if ASSET_USAGE_ADDRESSABLES
@@ -985,11 +983,7 @@ private ReferenceNode SearchRenderSettings( object obj )
985983 {
986984 ReferenceNode referenceNode = PopReferenceNode ( obj ) ;
987985
988- #if UNITY_2021_2_OR_NEWER
989986 referenceNode . AddLinkTo ( SearchObject ( defaultReflectionProbeGetter ( ) ) , "Default Reflection Probe" ) ;
990- #else
991- referenceNode . AddLinkTo ( SearchObject ( ReflectionProbe . defaultTexture ) , "Default Reflection Probe" ) ;
992- #endif
993987 SearchVariablesWithSerializedObject ( referenceNode , true ) ;
994988 return referenceNode ;
995989 }
@@ -1625,11 +1619,9 @@ private VariableGetterHolder[] GetFilteredVariablesForType( Type type )
16251619 if ( field . FieldType . IsIgnoredUnityType ( ) )
16261620 continue ;
16271621
1628- #if UNITY_2021_2_OR_NEWER
16291622 // "ref struct"s can't be accessed via reflection
16301623 if ( field . FieldType . IsByRefLike )
16311624 continue ;
1632- #endif
16331625
16341626 // Additional filtering for fields:
16351627 // 1- Ignore "m_RectTransform", "m_CanvasRenderer" and "m_Canvas" fields of Graphic components
@@ -1665,11 +1657,9 @@ private VariableGetterHolder[] GetFilteredVariablesForType( Type type )
16651657 if ( property . PropertyType . IsIgnoredUnityType ( ) )
16661658 continue ;
16671659
1668- #if UNITY_2021_2_OR_NEWER
16691660 // "ref struct"s can't be accessed via reflection
16701661 if ( property . PropertyType . IsByRefLike )
16711662 continue ;
1672- #endif
16731663
16741664 // Skip properties without a getter function
16751665 MethodInfo propertyGetter = property . GetGetMethod ( true ) ;
0 commit comments