File tree Expand file tree Collapse file tree
Editor/GenericTypesAnalyzer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- namespace GenericUnityObjects . Editor
1+ #if UNITY_2020_3 && ! ( UNITY_2020_3_0 || UNITY_2020_3_1 || UNITY_2020_3_2 || UNITY_2020_3_3 || UNITY_2020_3_4 || UNITY_2020_3_5 || UNITY_2020_3_6 || UNITY_2020_3_7 || UNITY_2020_3_8 || UNITY_2020_3_9 || UNITY_2020_3_10 || UNITY_2020_3_11 || UNITY_2020_3_12 || UNITY_2020_3_13 || UNITY_2020_3_14 || UNITY_2020_3_15 )
2+ #define UNITY_2020_3_16_OR_NEWER
3+ #endif
4+
5+ #if UNITY_2021_1 && ! ( UNITY_2021_1_0 || UNITY_2021_1_1 || UNITY_2021_1_2 || UNITY_2021_1_3 || UNITY_2021_1_4 || UNITY_2021_1_5 || UNITY_2021_1_6 || UNITY_2021_1_7 || UNITY_2021_1_8 || UNITY_2021_1_9 || UNITY_2021_1_10 || UNITY_2021_1_11 || UNITY_2021_1_12 || UNITY_2021_1_13 || UNITY_2021_1_14 || UNITY_2021_1_15 || UNITY_2021_1_16 )
6+ #define UNITY_2021_1_17_OR_NEWER
7+ #endif
8+
9+ namespace GenericUnityObjects . Editor
210{
311 using System ;
412 using System . Diagnostics . CodeAnalysis ;
@@ -166,8 +174,8 @@ private static void UpdateGeneratedAssemblies()
166174
167175 private static void FlushConfigChangesToDisk ( )
168176 {
169- // AssetDatabase.SaveAssetIfDirty was added in Unity 2020.3.16
170- #if UNITY_2020_3_OR_NEWER && ! ( UNITY_2020_3_0 || UNITY_2020_3_1 || UNITY_2020_3_2 || UNITY_2020_3_3 || UNITY_2020_3_4 || UNITY_2020_3_5 || UNITY_2020_3_6 || UNITY_2020_3_7 || UNITY_2020_3_8 || UNITY_2020_3_9 || UNITY_2020_3_10 || UNITY_2020_3_11 || UNITY_2020_3_12 || UNITY_2020_3_13 || UNITY_2020_3_14 || UNITY_2020_3_15 )
177+ // AssetDatabase.SaveAssetIfDirty was added in Unity 2020.3.16 and Unity 2021.1.17
178+ #if UNITY_2020_3_16_OR_NEWER || UNITY_2021_1_17_OR_NEWER || UNITY_2021_2_OR_NEWER
171179 AssetDatabase . SaveAssetIfDirty ( GenerationDatabase < MonoBehaviour > . Instance ) ;
172180 AssetDatabase . SaveAssetIfDirty ( GenerationDatabase < GenericScriptableObject > . Instance ) ;
173181 AssetDatabase . SaveAssetIfDirty ( GenericTypesDatabase < MonoBehaviour > . Instance ) ;
You can’t perform that action at this time.
0 commit comments