Skip to content

Commit 6658167

Browse files
committed
fix: show in console that UpmGitExtensions v2 is not available in Unity2018 or 2019
close #117
1 parent dab09c7 commit 6658167

File tree

5 files changed

+60
-0
lines changed

5 files changed

+60
-0
lines changed

Editor/Legacy.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "Coffee.UpmGitExtension.LegacyWarning",
3+
"references": [],
4+
"includePlatforms": [
5+
"Editor"
6+
],
7+
"excludePlatforms": [],
8+
"allowUnsafeCode": false,
9+
"overrideReferences": false,
10+
"precompiledReferences": [],
11+
"autoReferenced": false,
12+
"defineConstraints": [
13+
"!UNITY_2020_1_OR_NEWER"
14+
],
15+
"versionDefines": [],
16+
"noEngineReferences": false
17+
}

Editor/Legacy/Coffee.UpmGitExtension.LegacyWarning.asmdef.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Legacy/LegacyWarning.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using UnityEngine;
2+
using UnityEditor;
3+
4+
namespace Coffee.UpmGitExtension
5+
{
6+
public class LegacyWarning
7+
{
8+
[InitializeOnLoadMethod]
9+
private static void Log()
10+
{
11+
#if !UNITY_2020_1_OR_NEWER
12+
Debug.LogError("'UpmGitExtensions package (v2)' does not support Unity 2018 or 2019. Please install 'UpmGitExtensions package (v1)' instead.\n" +
13+
"For details, see https://github.com/mob-sakai/ParticleEffectForUGUI#installation-for-unity-2018-or-2019");
14+
#endif
15+
}
16+
}
17+
}

Editor/Legacy/LegacyWarning.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)