Skip to content

Commit

Permalink
Fix CS0618: [PreferenceItem] is obsolete (AutoLOD.cs)
Browse files Browse the repository at this point in the history
  • Loading branch information
StCost committed Jan 25, 2024
1 parent af191c4 commit 9a4d441
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Editor/AutoLOD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,19 @@ static void RemoveLODs(GameObject go)
}
}

#if UNITY_2018_3_OR_NEWER
[SettingsProvider]
static SettingsProvider PreferencesGUI()
{
return new SettingsProvider("Preferences/AutoLOD", SettingsScope.User)
{
guiHandler = (searchContext) => DeprecatedPreferencesGUI(),
};
}
#else
[PreferenceItem("AutoLOD")]
static void PreferencesGUI()
#endif
static void DeprecatedPreferencesGUI()
{
EditorGUILayout.BeginVertical();
EditorGUILayout.Space();
Expand Down

0 comments on commit 9a4d441

Please sign in to comment.