|
1 | | - |
2 | | - |
3 | | -/** |
4 | | - Copyright (c) blueback |
5 | | - Released under the MIT License |
6 | | - @brief 設定。 |
7 | | -*/ |
8 | | - |
9 | | - |
10 | | -/** Editor |
11 | | -*/ |
12 | | -#if(UNITY_EDITOR) |
13 | | -namespace Editor |
14 | | -{ |
15 | | - /** VersionManagerSetting |
16 | | - */ |
17 | | - [UnityEditor.InitializeOnLoad] |
18 | | - public static class VersionManagerSetting |
19 | | - { |
20 | | - /** VersionManagerSetting |
21 | | - */ |
22 | | - static VersionManagerSetting() |
23 | | - { |
24 | | - //Object_RootUssUxml |
25 | | - BlueBack.VersionManager.Editor.Object_RootUssUxml.Save(false); |
26 | | - |
27 | | - //projectparam |
28 | | - BlueBack.VersionManager.Editor.Object_Setting.s_projectparam = BlueBack.VersionManager.Editor.ProjectParam.Load(); |
29 | | - |
30 | | - //s_object_root_readme_md |
31 | | - BlueBack.VersionManager.Editor.Object_Setting.s_object_root_readme_md = new BlueBack.VersionManager.Editor.Object_Setting.Creator_Type[]{ |
32 | | - |
33 | | - //概要。 |
34 | | - (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
35 | | - System.Collections.Generic.List<string> t_list = new System.Collections.Generic.List<string>(); |
36 | | - t_list.Add("# " + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.namespace_author + "." + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.namespace_package); |
37 | | - t_list.AddRange(BlueBack.VersionManager.Editor.Object_Setting.Create_RootReadMd_Overview(a_argument)); |
38 | | - return t_list.ToArray(); |
39 | | - }, |
40 | | - |
41 | | - //ライセンス。 |
42 | | - (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
43 | | - return new string[]{ |
44 | | - "## ライセンス", |
45 | | - "MIT License", |
46 | | - "* " + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.git_url + "/blob/main/LICENSE", |
47 | | - }; |
48 | | - }, |
49 | | - |
50 | | - //依存。 |
51 | | - (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
52 | | - System.Collections.Generic.List<string> t_list = new System.Collections.Generic.List<string>(); |
53 | | - t_list.Add("## 依存 / 使用ライセンス等"); |
54 | | - t_list.AddRange(BlueBack.VersionManager.Editor.Object_Setting.Create_RootReadMd_Asmdef_Dependence(a_argument)); |
55 | | - return t_list.ToArray(); |
56 | | - }, |
57 | | - |
58 | | - //動作確認。 |
59 | | - (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
60 | | - return new string[]{ |
61 | | - "## 動作確認", |
62 | | - "Unity " + UnityEngine.Application.unityVersion, |
63 | | - }; |
64 | | - }, |
65 | | - |
66 | | - //UPM。 |
67 | | - (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
68 | | - return new string[]{ |
69 | | - "## UPM", |
70 | | - "### 最新", |
71 | | - "* " + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.git_url + ".git?path=" + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.git_path + "#" + a_argument.version, |
72 | | - "### 開発", |
73 | | - "* " + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.git_url + ".git?path=" + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.git_path, |
74 | | - }; |
75 | | - }, |
76 | | - |
77 | | - //インストール。 |
78 | | - (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
79 | | - return new string[]{ |
80 | | - "## Unityへの追加方法", |
81 | | - "* Unity起動", |
82 | | - "* メニュー選択:「Window->Package Manager」", |
83 | | - "* ボタン選択:「左上の+ボタン」", |
84 | | - "* リスト選択:「Add package from git URL...」", |
85 | | - "* 上記UPMのURLを追加「 https://github.com/~~/UPM#バージョン 」", |
86 | | - "### 注", |
87 | | - "Gitクライアントがインストールされている必要がある。", |
88 | | - "* https://docs.unity3d.com/ja/current/Manual/upm-git.html", |
89 | | - "* https://git-scm.com/", |
90 | | - }; |
91 | | - }, |
92 | | - |
93 | | - //例。 |
94 | | - (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
95 | | - System.Collections.Generic.List<string> t_list = new System.Collections.Generic.List<string>(); |
96 | | - t_list.AddRange(BlueBack.VersionManager.Editor.Object_Setting.Create_RootReadMd_Exsample(a_argument)); |
97 | | - return t_list.ToArray(); |
98 | | - }, |
99 | | - }; |
100 | | - } |
101 | | - } |
102 | | -} |
103 | | -#endif |
104 | | - |
| 1 | + |
| 2 | + |
| 3 | +/** |
| 4 | + Copyright (c) blueback |
| 5 | + Released under the MIT License |
| 6 | + @brief 設定。 |
| 7 | +*/ |
| 8 | + |
| 9 | + |
| 10 | +/** define |
| 11 | +*/ |
| 12 | +#if((ASMDEF_BLUEBACK_VERSIONMANAGER)||(USERDEF_BLUEBACK_VERSIONMANAGER)) |
| 13 | +#define ASMDEF_TRUE |
| 14 | +#endif |
| 15 | + |
| 16 | + |
| 17 | +/** Editor |
| 18 | +*/ |
| 19 | +#if(UNITY_EDITOR) |
| 20 | +namespace Editor |
| 21 | +{ |
| 22 | + /** VersionManagerSetting |
| 23 | + */ |
| 24 | + [UnityEditor.InitializeOnLoad] |
| 25 | + public static class VersionManagerSetting |
| 26 | + { |
| 27 | + /** VersionManagerSetting |
| 28 | + */ |
| 29 | + static VersionManagerSetting() |
| 30 | + #if(ASMDEF_TRUE) |
| 31 | + { |
| 32 | + //Object_RootUssUxml |
| 33 | + BlueBack.VersionManager.Editor.Object_RootUssUxml.Save(false); |
| 34 | + |
| 35 | + //projectparam |
| 36 | + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam = BlueBack.VersionManager.Editor.ProjectParam.Load(); |
| 37 | + |
| 38 | + //s_object_root_readme_md |
| 39 | + BlueBack.VersionManager.Editor.Object_Setting.s_object_root_readme_md = new BlueBack.VersionManager.Editor.Object_Setting.Creator_Type[]{ |
| 40 | + |
| 41 | + //概要。 |
| 42 | + (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
| 43 | + System.Collections.Generic.List<string> t_list = new System.Collections.Generic.List<string>(); |
| 44 | + t_list.Add("# " + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.namespace_author + "." + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.namespace_package); |
| 45 | + t_list.AddRange(BlueBack.VersionManager.Editor.Object_Setting.Create_RootReadMd_Overview(a_argument)); |
| 46 | + return t_list.ToArray(); |
| 47 | + }, |
| 48 | + |
| 49 | + //ライセンス。 |
| 50 | + (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
| 51 | + return new string[]{ |
| 52 | + "## ライセンス", |
| 53 | + "MIT License", |
| 54 | + "* " + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.git_url + "/blob/main/LICENSE", |
| 55 | + }; |
| 56 | + }, |
| 57 | + |
| 58 | + //依存。 |
| 59 | + (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
| 60 | + System.Collections.Generic.List<string> t_list = new System.Collections.Generic.List<string>(); |
| 61 | + t_list.Add("## 依存 / 使用ライセンス等"); |
| 62 | + t_list.AddRange(BlueBack.VersionManager.Editor.Object_Setting.Create_RootReadMd_Asmdef_Dependence(a_argument)); |
| 63 | + return t_list.ToArray(); |
| 64 | + }, |
| 65 | + |
| 66 | + //動作確認。 |
| 67 | + (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
| 68 | + return new string[]{ |
| 69 | + "## 動作確認", |
| 70 | + "Unity " + UnityEngine.Application.unityVersion, |
| 71 | + }; |
| 72 | + }, |
| 73 | + |
| 74 | + //UPM。 |
| 75 | + (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
| 76 | + return new string[]{ |
| 77 | + "## UPM", |
| 78 | + "### 最新", |
| 79 | + "* " + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.git_url + ".git?path=" + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.git_path + "#" + a_argument.version, |
| 80 | + "### 開発", |
| 81 | + "* " + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.git_url + ".git?path=" + BlueBack.VersionManager.Editor.Object_Setting.s_projectparam.git_path, |
| 82 | + }; |
| 83 | + }, |
| 84 | + |
| 85 | + //インストール。 |
| 86 | + (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
| 87 | + return new string[]{ |
| 88 | + "## Unityへの追加方法", |
| 89 | + "* Unity起動", |
| 90 | + "* メニュー選択:「Window->Package Manager」", |
| 91 | + "* ボタン選択:「左上の+ボタン」", |
| 92 | + "* リスト選択:「Add package from git URL...」", |
| 93 | + "* 上記UPMのURLを追加「 https://github.com/~~/UPM#バージョン 」", |
| 94 | + "### 注", |
| 95 | + "Gitクライアントがインストールされている必要がある。", |
| 96 | + "* https://docs.unity3d.com/ja/current/Manual/upm-git.html", |
| 97 | + "* https://git-scm.com/", |
| 98 | + }; |
| 99 | + }, |
| 100 | + |
| 101 | + //例。 |
| 102 | + (in BlueBack.VersionManager.Editor.Object_Setting.Creator_Argument a_argument) => { |
| 103 | + System.Collections.Generic.List<string> t_list = new System.Collections.Generic.List<string>(); |
| 104 | + t_list.AddRange(BlueBack.VersionManager.Editor.Object_Setting.Create_RootReadMd_Exsample(a_argument)); |
| 105 | + return t_list.ToArray(); |
| 106 | + }, |
| 107 | + }; |
| 108 | + } |
| 109 | + #else |
| 110 | + { |
| 111 | + #warning "ASMDEF_TRUE" |
| 112 | + } |
| 113 | + #endif |
| 114 | + } |
| 115 | +} |
| 116 | +#endif |
| 117 | + |
0 commit comments