質問編集履歴
1
エラーメッセージ詳細とコードの追加
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
UnityでAndroid用にビルドしようとして
|
1
|
+
UnityでAndroid用にビルドしようとして、UnityEditor.BuildPlayerWindow+BuildMethodException: Build failと、出てしまいました。
|
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
```
|
18
18
|
|
19
|
-
UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
|
19
|
+
・UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
|
20
20
|
|
21
21
|
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:162
|
22
22
|
|
@@ -26,13 +26,129 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
+
|
30
|
+
|
31
|
+
・Assets/PyroParticles/Demo/DemoScriptEditor.cs(4,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing an assembly reference?
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
・Assets/PyroParticles/Demo/DemoScriptEditor.cs(9,40): error CS0246: The type or namespace name `Editor' could not be found. Are you missing an assembly reference?
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
・Assets/PyroParticles/Demo/DemoScriptEditor.cs(13,30): error CS0115: `DigitalRuby.PyroParticles.LightningBoltEditor.OnInspectorGUI()' is marked as an override but no suitable method found to override
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
・Error building Player because scripts had compiler errors
|
44
|
+
|
45
|
+
|
46
|
+
|
29
47
|
```
|
30
48
|
|
31
49
|
|
32
50
|
|
33
51
|
###該当のソースコード
|
34
52
|
|
53
|
+
using System;
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
using UnityEngine;
|
58
|
+
|
59
|
+
using UnityEditor;
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
namespace DigitalRuby.PyroParticles
|
64
|
+
|
35
|
-
|
65
|
+
{
|
66
|
+
|
67
|
+
[CustomEditor(typeof(DemoScript))]
|
68
|
+
|
69
|
+
public class LightningBoltEditor : Editor
|
70
|
+
|
71
|
+
{
|
72
|
+
|
73
|
+
private Texture2D logo;
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
public override void OnInspectorGUI()
|
78
|
+
|
79
|
+
{
|
80
|
+
|
81
|
+
if (logo == null)
|
82
|
+
|
83
|
+
{
|
84
|
+
|
85
|
+
string[] guids = AssetDatabase.FindAssets("PyroParticlesLogo");
|
86
|
+
|
87
|
+
foreach (string guid in guids)
|
88
|
+
|
89
|
+
{
|
90
|
+
|
91
|
+
string path = AssetDatabase.GUIDToAssetPath(guid);
|
92
|
+
|
93
|
+
logo = AssetDatabase.LoadMainAssetAtPath(path) as Texture2D;
|
94
|
+
|
95
|
+
if (logo != null)
|
96
|
+
|
97
|
+
{
|
98
|
+
|
99
|
+
break;
|
100
|
+
|
101
|
+
}
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
if (logo != null)
|
108
|
+
|
109
|
+
{
|
110
|
+
|
111
|
+
const float maxLogoWidth = 430.0f;
|
112
|
+
|
113
|
+
EditorGUILayout.Separator();
|
114
|
+
|
115
|
+
float w = EditorGUIUtility.currentViewWidth;
|
116
|
+
|
117
|
+
Rect r = new Rect();
|
118
|
+
|
119
|
+
r.width = Math.Min(w - 40.0f, maxLogoWidth);
|
120
|
+
|
121
|
+
r.height = r.width / 2.7f;
|
122
|
+
|
123
|
+
Rect r2 = GUILayoutUtility.GetRect(r.width, r.height);
|
124
|
+
|
125
|
+
r.x = ((EditorGUIUtility.currentViewWidth - r.width) * 0.5f) - 4.0f;
|
126
|
+
|
127
|
+
r.y = r2.y;
|
128
|
+
|
129
|
+
GUI.DrawTexture(r, logo, ScaleMode.StretchToFill);
|
130
|
+
|
131
|
+
if (GUI.Button(r, "", new GUIStyle()))
|
132
|
+
|
133
|
+
{
|
134
|
+
|
135
|
+
Application.OpenURL("http://u3d.as/f1c");
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
EditorGUILayout.Separator();
|
140
|
+
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
DrawDefaultInspector();
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
}
|
150
|
+
|
151
|
+
}
|
36
152
|
|
37
153
|
|
38
154
|
|