u3d 0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.licenses.json +19 -0
- data/.rspec +1 -0
- data/.rubocop.yml +43 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +98 -0
- data/LICENSE +21 -0
- data/LICENSE.fastlane +22 -0
- data/LOG_RULES.md +170 -0
- data/README.md +72 -0
- data/Rakefile +28 -0
- data/TODO.md +15 -0
- data/build.sh +5 -0
- data/config/log_rules.json +230 -0
- data/examples/Example1/.gitignore +19 -0
- data/examples/Example1/Assets/Editor.meta +9 -0
- data/examples/Example1/Assets/Editor/EditorRun.cs +23 -0
- data/examples/Example1/Assets/Editor/EditorRun.cs.meta +12 -0
- data/examples/Example1/Assets/Editor/FileSystemUtil.cs +26 -0
- data/examples/Example1/Assets/Editor/FileSystemUtil.cs.meta +12 -0
- data/examples/Example1/Assets/Scene1.unity +264 -0
- data/examples/Example1/Assets/Scene1.unity.meta +8 -0
- data/examples/Example1/Gemfile +8 -0
- data/examples/Example1/Gemfile.lock +165 -0
- data/examples/Example1/ProjectSettings/AudioManager.asset +16 -0
- data/examples/Example1/ProjectSettings/ClusterInputManager.asset +6 -0
- data/examples/Example1/ProjectSettings/DynamicsManager.asset +18 -0
- data/examples/Example1/ProjectSettings/EditorBuildSettings.asset +7 -0
- data/examples/Example1/ProjectSettings/EditorSettings.asset +14 -0
- data/examples/Example1/ProjectSettings/GraphicsSettings.asset +61 -0
- data/examples/Example1/ProjectSettings/InputManager.asset +295 -0
- data/examples/Example1/ProjectSettings/NavMeshAreas.asset +89 -0
- data/examples/Example1/ProjectSettings/NetworkManager.asset +8 -0
- data/examples/Example1/ProjectSettings/Physics2DSettings.asset +35 -0
- data/examples/Example1/ProjectSettings/ProjectSettings.asset +591 -0
- data/examples/Example1/ProjectSettings/ProjectVersion.txt +1 -0
- data/examples/Example1/ProjectSettings/QualitySettings.asset +180 -0
- data/examples/Example1/ProjectSettings/TagManager.asset +43 -0
- data/examples/Example1/ProjectSettings/TimeManager.asset +9 -0
- data/examples/Example1/ProjectSettings/UnityConnectSettings.asset +32 -0
- data/examples/Example1/README.md +5 -0
- data/examples/Example1/Rakefile +5 -0
- data/examples/Example1/fastlane/Fastfile +4 -0
- data/examples/Example1/fastlane/Pluginfile +1 -0
- data/examples/Example1/run.sh +1 -0
- data/examples/Example2/.gitignore +20 -0
- data/examples/Example2/Assets/Editor.meta +9 -0
- data/examples/Example2/Assets/Editor/EditorRun.cs +33 -0
- data/examples/Example2/Assets/Editor/EditorRun.cs.meta +12 -0
- data/examples/Example2/Assets/Editor/PostprocessBuildPlayer.cs +92 -0
- data/examples/Example2/Assets/Editor/PostprocessBuildPlayer.cs.meta +8 -0
- data/examples/Example2/Assets/Editor/PostprocessBuildPlayer_log.sh +31 -0
- data/examples/Example2/Assets/Editor/PostprocessBuildPlayer_log.sh.meta +8 -0
- data/examples/Example2/Assets/Editor/SimpleBuildSetup.cs +20 -0
- data/examples/Example2/Assets/Editor/SimpleBuildSetup.cs.meta +12 -0
- data/examples/Example2/Assets/Scene.unity +278 -0
- data/examples/Example2/Assets/Scene.unity.meta +8 -0
- data/examples/Example2/Gemfile +8 -0
- data/examples/Example2/Gemfile.lock +165 -0
- data/examples/Example2/ProjectSettings/AudioManager.asset +17 -0
- data/examples/Example2/ProjectSettings/ClusterInputManager.asset +6 -0
- data/examples/Example2/ProjectSettings/DynamicsManager.asset +19 -0
- data/examples/Example2/ProjectSettings/EditorBuildSettings.asset +10 -0
- data/examples/Example2/ProjectSettings/EditorSettings.asset +14 -0
- data/examples/Example2/ProjectSettings/GraphicsSettings.asset +63 -0
- data/examples/Example2/ProjectSettings/InputManager.asset +295 -0
- data/examples/Example2/ProjectSettings/NavMeshAreas.asset +89 -0
- data/examples/Example2/ProjectSettings/NetworkManager.asset +8 -0
- data/examples/Example2/ProjectSettings/Physics2DSettings.asset +36 -0
- data/examples/Example2/ProjectSettings/ProjectSettings.asset +591 -0
- data/examples/Example2/ProjectSettings/ProjectVersion.txt +1 -0
- data/examples/Example2/ProjectSettings/QualitySettings.asset +193 -0
- data/examples/Example2/ProjectSettings/TagManager.asset +43 -0
- data/examples/Example2/ProjectSettings/TimeManager.asset +9 -0
- data/examples/Example2/ProjectSettings/UnityConnectSettings.asset +34 -0
- data/examples/Example2/README.md +10 -0
- data/examples/Example2/fastlane/Fastfile +4 -0
- data/examples/Example2/fastlane/Pluginfile +1 -0
- data/exe/u3d +7 -0
- data/fastlane-plugin-u3d/.gitignore +10 -0
- data/fastlane-plugin-u3d/.licenses.json +9 -0
- data/fastlane-plugin-u3d/.rspec +3 -0
- data/fastlane-plugin-u3d/.rubocop.yml +253 -0
- data/fastlane-plugin-u3d/.travis.yml +4 -0
- data/fastlane-plugin-u3d/Gemfile +6 -0
- data/fastlane-plugin-u3d/LICENSE +21 -0
- data/fastlane-plugin-u3d/README.md +52 -0
- data/fastlane-plugin-u3d/Rakefile +9 -0
- data/fastlane-plugin-u3d/circle.yml +9 -0
- data/fastlane-plugin-u3d/fastlane-plugin-u3d.gemspec +31 -0
- data/fastlane-plugin-u3d/fastlane/Fastfile +3 -0
- data/fastlane-plugin-u3d/fastlane/Pluginfile +1 -0
- data/fastlane-plugin-u3d/lib/fastlane/plugin/u3d.rb +38 -0
- data/fastlane-plugin-u3d/lib/fastlane/plugin/u3d/actions/u3d_action.rb +80 -0
- data/fastlane-plugin-u3d/lib/fastlane/plugin/u3d/helper/u3d_helper.rb +34 -0
- data/fastlane-plugin-u3d/lib/fastlane/plugin/u3d/version.rb +27 -0
- data/fastlane-plugin-u3d/spec/spec_helper.rb +32 -0
- data/lib/u3d.rb +33 -0
- data/lib/u3d/cache.rb +120 -0
- data/lib/u3d/commands.rb +307 -0
- data/lib/u3d/commands_generator.rb +163 -0
- data/lib/u3d/downloader.rb +363 -0
- data/lib/u3d/iniparser.rb +83 -0
- data/lib/u3d/installer.rb +445 -0
- data/lib/u3d/log_analyzer.rb +221 -0
- data/lib/u3d/unity_version_number.rb +71 -0
- data/lib/u3d/unity_versions.rb +207 -0
- data/lib/u3d/utils.rb +121 -0
- data/lib/u3d/version.rb +31 -0
- data/lib/u3d_core.rb +30 -0
- data/lib/u3d_core/command_executor.rb +134 -0
- data/lib/u3d_core/command_runner.rb +93 -0
- data/lib/u3d_core/credentials.rb +116 -0
- data/lib/u3d_core/globals.rb +84 -0
- data/lib/u3d_core/helper.rb +149 -0
- data/lib/u3d_core/ui/disable_colors.rb +40 -0
- data/lib/u3d_core/ui/implementations/shell.rb +157 -0
- data/lib/u3d_core/ui/interface.rb +182 -0
- data/lib/u3d_core/ui/ui.rb +49 -0
- data/local_gem_install.sh +6 -0
- data/scripts/be +14 -0
- data/u3d.gemspec +41 -0
- metadata +388 -0
@@ -0,0 +1 @@
|
|
1
|
+
m_EditorVersion: 5.6.1f1
|
@@ -0,0 +1,180 @@
|
|
1
|
+
%YAML 1.1
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
3
|
+
--- !u!47 &1
|
4
|
+
QualitySettings:
|
5
|
+
m_ObjectHideFlags: 0
|
6
|
+
serializedVersion: 5
|
7
|
+
m_CurrentQuality: 5
|
8
|
+
m_QualitySettings:
|
9
|
+
- serializedVersion: 2
|
10
|
+
name: Fastest
|
11
|
+
pixelLightCount: 0
|
12
|
+
shadows: 0
|
13
|
+
shadowResolution: 0
|
14
|
+
shadowProjection: 1
|
15
|
+
shadowCascades: 1
|
16
|
+
shadowDistance: 15
|
17
|
+
shadowNearPlaneOffset: 3
|
18
|
+
shadowCascade2Split: 0.33333334
|
19
|
+
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
20
|
+
blendWeights: 1
|
21
|
+
textureQuality: 1
|
22
|
+
anisotropicTextures: 0
|
23
|
+
antiAliasing: 0
|
24
|
+
softParticles: 0
|
25
|
+
softVegetation: 0
|
26
|
+
realtimeReflectionProbes: 0
|
27
|
+
billboardsFaceCameraPosition: 0
|
28
|
+
vSyncCount: 0
|
29
|
+
lodBias: 0.3
|
30
|
+
maximumLODLevel: 0
|
31
|
+
particleRaycastBudget: 4
|
32
|
+
asyncUploadTimeSlice: 2
|
33
|
+
asyncUploadBufferSize: 4
|
34
|
+
excludedTargetPlatforms: []
|
35
|
+
- serializedVersion: 2
|
36
|
+
name: Fast
|
37
|
+
pixelLightCount: 0
|
38
|
+
shadows: 0
|
39
|
+
shadowResolution: 0
|
40
|
+
shadowProjection: 1
|
41
|
+
shadowCascades: 1
|
42
|
+
shadowDistance: 20
|
43
|
+
shadowNearPlaneOffset: 3
|
44
|
+
shadowCascade2Split: 0.33333334
|
45
|
+
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
46
|
+
blendWeights: 2
|
47
|
+
textureQuality: 0
|
48
|
+
anisotropicTextures: 0
|
49
|
+
antiAliasing: 0
|
50
|
+
softParticles: 0
|
51
|
+
softVegetation: 0
|
52
|
+
realtimeReflectionProbes: 0
|
53
|
+
billboardsFaceCameraPosition: 0
|
54
|
+
vSyncCount: 0
|
55
|
+
lodBias: 0.4
|
56
|
+
maximumLODLevel: 0
|
57
|
+
particleRaycastBudget: 16
|
58
|
+
asyncUploadTimeSlice: 2
|
59
|
+
asyncUploadBufferSize: 4
|
60
|
+
excludedTargetPlatforms: []
|
61
|
+
- serializedVersion: 2
|
62
|
+
name: Simple
|
63
|
+
pixelLightCount: 1
|
64
|
+
shadows: 1
|
65
|
+
shadowResolution: 0
|
66
|
+
shadowProjection: 1
|
67
|
+
shadowCascades: 1
|
68
|
+
shadowDistance: 20
|
69
|
+
shadowNearPlaneOffset: 3
|
70
|
+
shadowCascade2Split: 0.33333334
|
71
|
+
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
72
|
+
blendWeights: 2
|
73
|
+
textureQuality: 0
|
74
|
+
anisotropicTextures: 1
|
75
|
+
antiAliasing: 0
|
76
|
+
softParticles: 0
|
77
|
+
softVegetation: 0
|
78
|
+
realtimeReflectionProbes: 0
|
79
|
+
billboardsFaceCameraPosition: 0
|
80
|
+
vSyncCount: 1
|
81
|
+
lodBias: 0.7
|
82
|
+
maximumLODLevel: 0
|
83
|
+
particleRaycastBudget: 64
|
84
|
+
asyncUploadTimeSlice: 2
|
85
|
+
asyncUploadBufferSize: 4
|
86
|
+
excludedTargetPlatforms: []
|
87
|
+
- serializedVersion: 2
|
88
|
+
name: Good
|
89
|
+
pixelLightCount: 2
|
90
|
+
shadows: 2
|
91
|
+
shadowResolution: 1
|
92
|
+
shadowProjection: 1
|
93
|
+
shadowCascades: 2
|
94
|
+
shadowDistance: 40
|
95
|
+
shadowNearPlaneOffset: 3
|
96
|
+
shadowCascade2Split: 0.33333334
|
97
|
+
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
98
|
+
blendWeights: 2
|
99
|
+
textureQuality: 0
|
100
|
+
anisotropicTextures: 1
|
101
|
+
antiAliasing: 0
|
102
|
+
softParticles: 0
|
103
|
+
softVegetation: 1
|
104
|
+
realtimeReflectionProbes: 1
|
105
|
+
billboardsFaceCameraPosition: 1
|
106
|
+
vSyncCount: 1
|
107
|
+
lodBias: 1
|
108
|
+
maximumLODLevel: 0
|
109
|
+
particleRaycastBudget: 256
|
110
|
+
asyncUploadTimeSlice: 2
|
111
|
+
asyncUploadBufferSize: 4
|
112
|
+
excludedTargetPlatforms: []
|
113
|
+
- serializedVersion: 2
|
114
|
+
name: Beautiful
|
115
|
+
pixelLightCount: 3
|
116
|
+
shadows: 2
|
117
|
+
shadowResolution: 2
|
118
|
+
shadowProjection: 1
|
119
|
+
shadowCascades: 2
|
120
|
+
shadowDistance: 70
|
121
|
+
shadowNearPlaneOffset: 3
|
122
|
+
shadowCascade2Split: 0.33333334
|
123
|
+
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
124
|
+
blendWeights: 4
|
125
|
+
textureQuality: 0
|
126
|
+
anisotropicTextures: 2
|
127
|
+
antiAliasing: 2
|
128
|
+
softParticles: 1
|
129
|
+
softVegetation: 1
|
130
|
+
realtimeReflectionProbes: 1
|
131
|
+
billboardsFaceCameraPosition: 1
|
132
|
+
vSyncCount: 1
|
133
|
+
lodBias: 1.5
|
134
|
+
maximumLODLevel: 0
|
135
|
+
particleRaycastBudget: 1024
|
136
|
+
asyncUploadTimeSlice: 2
|
137
|
+
asyncUploadBufferSize: 4
|
138
|
+
excludedTargetPlatforms: []
|
139
|
+
- serializedVersion: 2
|
140
|
+
name: Fantastic
|
141
|
+
pixelLightCount: 4
|
142
|
+
shadows: 2
|
143
|
+
shadowResolution: 2
|
144
|
+
shadowProjection: 1
|
145
|
+
shadowCascades: 4
|
146
|
+
shadowDistance: 150
|
147
|
+
shadowNearPlaneOffset: 3
|
148
|
+
shadowCascade2Split: 0.33333334
|
149
|
+
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
150
|
+
blendWeights: 4
|
151
|
+
textureQuality: 0
|
152
|
+
anisotropicTextures: 2
|
153
|
+
antiAliasing: 2
|
154
|
+
softParticles: 1
|
155
|
+
softVegetation: 1
|
156
|
+
realtimeReflectionProbes: 1
|
157
|
+
billboardsFaceCameraPosition: 1
|
158
|
+
vSyncCount: 1
|
159
|
+
lodBias: 2
|
160
|
+
maximumLODLevel: 0
|
161
|
+
particleRaycastBudget: 4096
|
162
|
+
asyncUploadTimeSlice: 2
|
163
|
+
asyncUploadBufferSize: 4
|
164
|
+
excludedTargetPlatforms: []
|
165
|
+
m_PerPlatformDefaultQuality:
|
166
|
+
Android: 2
|
167
|
+
Nintendo 3DS: 5
|
168
|
+
PS4: 5
|
169
|
+
PSM: 5
|
170
|
+
PSP2: 2
|
171
|
+
Samsung TV: 2
|
172
|
+
Standalone: 5
|
173
|
+
Tizen: 2
|
174
|
+
Web: 5
|
175
|
+
WebGL: 3
|
176
|
+
WiiU: 5
|
177
|
+
Windows Store Apps: 5
|
178
|
+
XboxOne: 5
|
179
|
+
iPhone: 2
|
180
|
+
tvOS: 2
|
@@ -0,0 +1,43 @@
|
|
1
|
+
%YAML 1.1
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
3
|
+
--- !u!78 &1
|
4
|
+
TagManager:
|
5
|
+
serializedVersion: 2
|
6
|
+
tags: []
|
7
|
+
layers:
|
8
|
+
- Default
|
9
|
+
- TransparentFX
|
10
|
+
- Ignore Raycast
|
11
|
+
-
|
12
|
+
- Water
|
13
|
+
- UI
|
14
|
+
-
|
15
|
+
-
|
16
|
+
-
|
17
|
+
-
|
18
|
+
-
|
19
|
+
-
|
20
|
+
-
|
21
|
+
-
|
22
|
+
-
|
23
|
+
-
|
24
|
+
-
|
25
|
+
-
|
26
|
+
-
|
27
|
+
-
|
28
|
+
-
|
29
|
+
-
|
30
|
+
-
|
31
|
+
-
|
32
|
+
-
|
33
|
+
-
|
34
|
+
-
|
35
|
+
-
|
36
|
+
-
|
37
|
+
-
|
38
|
+
-
|
39
|
+
-
|
40
|
+
m_SortingLayers:
|
41
|
+
- name: Default
|
42
|
+
uniqueID: 0
|
43
|
+
locked: 0
|
@@ -0,0 +1,32 @@
|
|
1
|
+
%YAML 1.1
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
3
|
+
--- !u!310 &1
|
4
|
+
UnityConnectSettings:
|
5
|
+
m_ObjectHideFlags: 0
|
6
|
+
m_Enabled: 0
|
7
|
+
m_TestMode: 0
|
8
|
+
m_TestEventUrl:
|
9
|
+
m_TestConfigUrl:
|
10
|
+
m_TestInitMode: 0
|
11
|
+
CrashReportingSettings:
|
12
|
+
m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes
|
13
|
+
m_Enabled: 0
|
14
|
+
m_CaptureEditorExceptions: 1
|
15
|
+
UnityPurchasingSettings:
|
16
|
+
m_Enabled: 0
|
17
|
+
m_TestMode: 0
|
18
|
+
UnityAnalyticsSettings:
|
19
|
+
m_Enabled: 0
|
20
|
+
m_InitializeOnStartup: 1
|
21
|
+
m_TestMode: 0
|
22
|
+
m_TestEventUrl:
|
23
|
+
m_TestConfigUrl:
|
24
|
+
UnityAdsSettings:
|
25
|
+
m_Enabled: 0
|
26
|
+
m_InitializeOnStartup: 1
|
27
|
+
m_TestMode: 0
|
28
|
+
m_EnabledPlatforms: 4294967295
|
29
|
+
m_IosGameId:
|
30
|
+
m_AndroidGameId:
|
31
|
+
PerformanceReportingSettings:
|
32
|
+
m_Enabled: 0
|
@@ -0,0 +1 @@
|
|
1
|
+
gem 'fastlane-plugin-u3d', :path => File.join(REPO_ROOT, 'fastlane-plugin-u3d')
|
@@ -0,0 +1 @@
|
|
1
|
+
u3d -- -logFile './editor.log' -executeMethod U3d.EditorRun.LoadSaveScenes -quit -batchmode
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Unity specific
|
2
|
+
Library/
|
3
|
+
Temp/
|
4
|
+
*.csproj
|
5
|
+
*.pidb
|
6
|
+
*.pidb.meta
|
7
|
+
*.sln
|
8
|
+
*.suo
|
9
|
+
*.userprefs
|
10
|
+
|
11
|
+
# bundler specific
|
12
|
+
.bundle/
|
13
|
+
|
14
|
+
# fastlane specific
|
15
|
+
fastlane/report.xml
|
16
|
+
fastlane/README.md
|
17
|
+
|
18
|
+
# project specific
|
19
|
+
editor.log
|
20
|
+
target/
|
@@ -0,0 +1,33 @@
|
|
1
|
+
using UnityEditor;
|
2
|
+
using UnityEngine;
|
3
|
+
using System.Collections.Generic;
|
4
|
+
using System.IO;
|
5
|
+
using System;
|
6
|
+
|
7
|
+
namespace U3d {
|
8
|
+
class EditorRun {
|
9
|
+
[MenuItem ("U3d/Example/Build")]
|
10
|
+
static void Build() {
|
11
|
+
Debug.Log("Building Example2");
|
12
|
+
|
13
|
+
BuildPlayer(EditorBuildSettings.scenes, "target/Example2.app", BuildTarget.StandaloneOSXIntel64, BuildOptions.None);
|
14
|
+
}
|
15
|
+
|
16
|
+
private static void BuildPlayer(EditorBuildSettingsScene[] scenes, string target_dir, BuildTarget build_target, BuildOptions build_options) {
|
17
|
+
FileSystemUtil.EnsureParentExists(target_dir);
|
18
|
+
string res = BuildPipeline.BuildPlayer(scenes, target_dir, build_target, build_options);
|
19
|
+
if (res.Length > 0) {
|
20
|
+
throw new Exception("BuildPlayer failure: " + res);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
class FileSystemUtil {
|
26
|
+
public static void EnsureParentExists(string target_dir) {
|
27
|
+
DirectoryInfo parent = Directory.GetParent(target_dir);
|
28
|
+
if (!parent.Exists) {
|
29
|
+
Directory.CreateDirectory(parent.FullName);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
fileFormatVersion: 2
|
2
|
+
guid: ef34e92a4f6f54f31aba66f623d9d426
|
3
|
+
timeCreated: 1500637649
|
4
|
+
licenseType: Pro
|
5
|
+
MonoImporter:
|
6
|
+
serializedVersion: 2
|
7
|
+
defaultReferences: []
|
8
|
+
executionOrder: 0
|
9
|
+
icon: {instanceID: 0}
|
10
|
+
userData:
|
11
|
+
assetBundleName:
|
12
|
+
assetBundleVariant:
|
@@ -0,0 +1,92 @@
|
|
1
|
+
using UnityEngine;
|
2
|
+
using System.Collections;
|
3
|
+
using UnityEditor;
|
4
|
+
using UnityEditor.Callbacks;
|
5
|
+
using System.IO;
|
6
|
+
using System;
|
7
|
+
using System.Text;
|
8
|
+
|
9
|
+
public class PostprocessBuildPlayer : ScriptableObject {
|
10
|
+
|
11
|
+
[PostProcessBuild]
|
12
|
+
static void OnPostprocessBuildPlayer(BuildTarget target, string buildPath) {
|
13
|
+
if (Application.platform == RuntimePlatform.WindowsEditor) {
|
14
|
+
Debug.LogWarning("PostprocessBuildPlayer not supported on Windows");
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
|
18
|
+
string editorPath = Path.GetFullPath(Path.GetDirectoryName(AssetDatabase.GetAssetPath(MonoScript.FromScriptableObject(ScriptableObject.CreateInstance<PostprocessBuildPlayer>()))));
|
19
|
+
|
20
|
+
if (!Directory.Exists(editorPath)) {
|
21
|
+
Debug.LogError("No directory at: " + editorPath);
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
|
25
|
+
if (!Directory.Exists(buildPath) && !File.Exists(buildPath)) {
|
26
|
+
Debug.LogError("No directory at: " + buildPath);
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
|
30
|
+
var files = Directory.GetFiles(editorPath, "*.*", SearchOption.TopDirectoryOnly);
|
31
|
+
|
32
|
+
files = System.Array.FindAll<string>(files, (x) => {
|
33
|
+
var name = Path.GetFileName(x).ToLower();
|
34
|
+
|
35
|
+
return name.StartsWith("postprocessbuildplayer_") && !name.EndsWith("meta");
|
36
|
+
});
|
37
|
+
|
38
|
+
if (files.Length == 0) {
|
39
|
+
Debug.Log("No postprocess scripts at: " + editorPath);
|
40
|
+
return;
|
41
|
+
}
|
42
|
+
|
43
|
+
var args = new string[] {
|
44
|
+
buildPath,
|
45
|
+
target.ToString()
|
46
|
+
};
|
47
|
+
|
48
|
+
foreach (var file in files) {
|
49
|
+
string AllArgs = string.Join(" ", args);
|
50
|
+
Debug.Log("executing: " + file + " " + AllArgs);
|
51
|
+
|
52
|
+
using (var process = new System.Diagnostics.Process()) {
|
53
|
+
process.StartInfo.FileName = file;
|
54
|
+
process.StartInfo.Arguments = AllArgs;
|
55
|
+
process.StartInfo.RedirectStandardError = true;
|
56
|
+
process.StartInfo.RedirectStandardOutput = true;
|
57
|
+
process.StartInfo.UseShellExecute = false;
|
58
|
+
|
59
|
+
StringBuilder stdout = new StringBuilder();
|
60
|
+
StringBuilder stderr = new StringBuilder();
|
61
|
+
|
62
|
+
process.OutputDataReceived += (sender, e) => {
|
63
|
+
if (e.Data == null) return;
|
64
|
+
stdout.Append(e.Data).Append("\n");
|
65
|
+
};
|
66
|
+
process.ErrorDataReceived += (sender, e) => {
|
67
|
+
if (e.Data == null) return;
|
68
|
+
stderr.Append(e.Data).Append("\n");
|
69
|
+
};
|
70
|
+
process.EnableRaisingEvents = true;
|
71
|
+
|
72
|
+
process.Start();
|
73
|
+
|
74
|
+
process.BeginOutputReadLine();
|
75
|
+
process.BeginErrorReadLine();
|
76
|
+
|
77
|
+
process.WaitForExit();
|
78
|
+
|
79
|
+
string output = stdout.ToString();
|
80
|
+
if (output.Length > 0)
|
81
|
+
Debug.Log("** output: \n" + output);
|
82
|
+
string error = stderr.ToString();
|
83
|
+
if (error.Length > 0)
|
84
|
+
Debug.Log("** error: \n" + error);
|
85
|
+
|
86
|
+
if (process.ExitCode != 0) {
|
87
|
+
throw new Exception("Failer running " + file + " error: " + process.ExitCode + " : " + error);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|