u3d 0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.licenses.json +19 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +43 -0
  6. data/Gemfile +5 -0
  7. data/Gemfile.lock +98 -0
  8. data/LICENSE +21 -0
  9. data/LICENSE.fastlane +22 -0
  10. data/LOG_RULES.md +170 -0
  11. data/README.md +72 -0
  12. data/Rakefile +28 -0
  13. data/TODO.md +15 -0
  14. data/build.sh +5 -0
  15. data/config/log_rules.json +230 -0
  16. data/examples/Example1/.gitignore +19 -0
  17. data/examples/Example1/Assets/Editor.meta +9 -0
  18. data/examples/Example1/Assets/Editor/EditorRun.cs +23 -0
  19. data/examples/Example1/Assets/Editor/EditorRun.cs.meta +12 -0
  20. data/examples/Example1/Assets/Editor/FileSystemUtil.cs +26 -0
  21. data/examples/Example1/Assets/Editor/FileSystemUtil.cs.meta +12 -0
  22. data/examples/Example1/Assets/Scene1.unity +264 -0
  23. data/examples/Example1/Assets/Scene1.unity.meta +8 -0
  24. data/examples/Example1/Gemfile +8 -0
  25. data/examples/Example1/Gemfile.lock +165 -0
  26. data/examples/Example1/ProjectSettings/AudioManager.asset +16 -0
  27. data/examples/Example1/ProjectSettings/ClusterInputManager.asset +6 -0
  28. data/examples/Example1/ProjectSettings/DynamicsManager.asset +18 -0
  29. data/examples/Example1/ProjectSettings/EditorBuildSettings.asset +7 -0
  30. data/examples/Example1/ProjectSettings/EditorSettings.asset +14 -0
  31. data/examples/Example1/ProjectSettings/GraphicsSettings.asset +61 -0
  32. data/examples/Example1/ProjectSettings/InputManager.asset +295 -0
  33. data/examples/Example1/ProjectSettings/NavMeshAreas.asset +89 -0
  34. data/examples/Example1/ProjectSettings/NetworkManager.asset +8 -0
  35. data/examples/Example1/ProjectSettings/Physics2DSettings.asset +35 -0
  36. data/examples/Example1/ProjectSettings/ProjectSettings.asset +591 -0
  37. data/examples/Example1/ProjectSettings/ProjectVersion.txt +1 -0
  38. data/examples/Example1/ProjectSettings/QualitySettings.asset +180 -0
  39. data/examples/Example1/ProjectSettings/TagManager.asset +43 -0
  40. data/examples/Example1/ProjectSettings/TimeManager.asset +9 -0
  41. data/examples/Example1/ProjectSettings/UnityConnectSettings.asset +32 -0
  42. data/examples/Example1/README.md +5 -0
  43. data/examples/Example1/Rakefile +5 -0
  44. data/examples/Example1/fastlane/Fastfile +4 -0
  45. data/examples/Example1/fastlane/Pluginfile +1 -0
  46. data/examples/Example1/run.sh +1 -0
  47. data/examples/Example2/.gitignore +20 -0
  48. data/examples/Example2/Assets/Editor.meta +9 -0
  49. data/examples/Example2/Assets/Editor/EditorRun.cs +33 -0
  50. data/examples/Example2/Assets/Editor/EditorRun.cs.meta +12 -0
  51. data/examples/Example2/Assets/Editor/PostprocessBuildPlayer.cs +92 -0
  52. data/examples/Example2/Assets/Editor/PostprocessBuildPlayer.cs.meta +8 -0
  53. data/examples/Example2/Assets/Editor/PostprocessBuildPlayer_log.sh +31 -0
  54. data/examples/Example2/Assets/Editor/PostprocessBuildPlayer_log.sh.meta +8 -0
  55. data/examples/Example2/Assets/Editor/SimpleBuildSetup.cs +20 -0
  56. data/examples/Example2/Assets/Editor/SimpleBuildSetup.cs.meta +12 -0
  57. data/examples/Example2/Assets/Scene.unity +278 -0
  58. data/examples/Example2/Assets/Scene.unity.meta +8 -0
  59. data/examples/Example2/Gemfile +8 -0
  60. data/examples/Example2/Gemfile.lock +165 -0
  61. data/examples/Example2/ProjectSettings/AudioManager.asset +17 -0
  62. data/examples/Example2/ProjectSettings/ClusterInputManager.asset +6 -0
  63. data/examples/Example2/ProjectSettings/DynamicsManager.asset +19 -0
  64. data/examples/Example2/ProjectSettings/EditorBuildSettings.asset +10 -0
  65. data/examples/Example2/ProjectSettings/EditorSettings.asset +14 -0
  66. data/examples/Example2/ProjectSettings/GraphicsSettings.asset +63 -0
  67. data/examples/Example2/ProjectSettings/InputManager.asset +295 -0
  68. data/examples/Example2/ProjectSettings/NavMeshAreas.asset +89 -0
  69. data/examples/Example2/ProjectSettings/NetworkManager.asset +8 -0
  70. data/examples/Example2/ProjectSettings/Physics2DSettings.asset +36 -0
  71. data/examples/Example2/ProjectSettings/ProjectSettings.asset +591 -0
  72. data/examples/Example2/ProjectSettings/ProjectVersion.txt +1 -0
  73. data/examples/Example2/ProjectSettings/QualitySettings.asset +193 -0
  74. data/examples/Example2/ProjectSettings/TagManager.asset +43 -0
  75. data/examples/Example2/ProjectSettings/TimeManager.asset +9 -0
  76. data/examples/Example2/ProjectSettings/UnityConnectSettings.asset +34 -0
  77. data/examples/Example2/README.md +10 -0
  78. data/examples/Example2/fastlane/Fastfile +4 -0
  79. data/examples/Example2/fastlane/Pluginfile +1 -0
  80. data/exe/u3d +7 -0
  81. data/fastlane-plugin-u3d/.gitignore +10 -0
  82. data/fastlane-plugin-u3d/.licenses.json +9 -0
  83. data/fastlane-plugin-u3d/.rspec +3 -0
  84. data/fastlane-plugin-u3d/.rubocop.yml +253 -0
  85. data/fastlane-plugin-u3d/.travis.yml +4 -0
  86. data/fastlane-plugin-u3d/Gemfile +6 -0
  87. data/fastlane-plugin-u3d/LICENSE +21 -0
  88. data/fastlane-plugin-u3d/README.md +52 -0
  89. data/fastlane-plugin-u3d/Rakefile +9 -0
  90. data/fastlane-plugin-u3d/circle.yml +9 -0
  91. data/fastlane-plugin-u3d/fastlane-plugin-u3d.gemspec +31 -0
  92. data/fastlane-plugin-u3d/fastlane/Fastfile +3 -0
  93. data/fastlane-plugin-u3d/fastlane/Pluginfile +1 -0
  94. data/fastlane-plugin-u3d/lib/fastlane/plugin/u3d.rb +38 -0
  95. data/fastlane-plugin-u3d/lib/fastlane/plugin/u3d/actions/u3d_action.rb +80 -0
  96. data/fastlane-plugin-u3d/lib/fastlane/plugin/u3d/helper/u3d_helper.rb +34 -0
  97. data/fastlane-plugin-u3d/lib/fastlane/plugin/u3d/version.rb +27 -0
  98. data/fastlane-plugin-u3d/spec/spec_helper.rb +32 -0
  99. data/lib/u3d.rb +33 -0
  100. data/lib/u3d/cache.rb +120 -0
  101. data/lib/u3d/commands.rb +307 -0
  102. data/lib/u3d/commands_generator.rb +163 -0
  103. data/lib/u3d/downloader.rb +363 -0
  104. data/lib/u3d/iniparser.rb +83 -0
  105. data/lib/u3d/installer.rb +445 -0
  106. data/lib/u3d/log_analyzer.rb +221 -0
  107. data/lib/u3d/unity_version_number.rb +71 -0
  108. data/lib/u3d/unity_versions.rb +207 -0
  109. data/lib/u3d/utils.rb +121 -0
  110. data/lib/u3d/version.rb +31 -0
  111. data/lib/u3d_core.rb +30 -0
  112. data/lib/u3d_core/command_executor.rb +134 -0
  113. data/lib/u3d_core/command_runner.rb +93 -0
  114. data/lib/u3d_core/credentials.rb +116 -0
  115. data/lib/u3d_core/globals.rb +84 -0
  116. data/lib/u3d_core/helper.rb +149 -0
  117. data/lib/u3d_core/ui/disable_colors.rb +40 -0
  118. data/lib/u3d_core/ui/implementations/shell.rb +157 -0
  119. data/lib/u3d_core/ui/interface.rb +182 -0
  120. data/lib/u3d_core/ui/ui.rb +49 -0
  121. data/local_gem_install.sh +6 -0
  122. data/scripts/be +14 -0
  123. data/u3d.gemspec +41 -0
  124. 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,9 @@
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!5 &1
4
+ TimeManager:
5
+ m_ObjectHideFlags: 0
6
+ Fixed Timestep: 0.02
7
+ Maximum Allowed Timestep: 0.33333334
8
+ m_TimeScale: 1
9
+ Maximum Particle Timestep: 0.03
@@ -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,5 @@
1
+ This example shows how to use u3d:
2
+
3
+ * from a shell script (`run.sh`)
4
+ * from rake (`rake u3d_load_save_scenes`)
5
+ * from fastlane (`[bundle exec] fastlane u3d_load_save_scenes`)
@@ -0,0 +1,5 @@
1
+ # Example integration of u3d
2
+
3
+ task :u3d_load_save_scenes do
4
+ system("u3d -- -logFile './editor.log' -executeMethod U3d.EditorRun.LoadSaveScenes -quit -batchmode")
5
+ end
@@ -0,0 +1,4 @@
1
+ desc "Run the EditorRun.LoadSaveScenes task"
2
+ lane :u3d_build do
3
+ u3d(run_args: "-logFile './editor.log' -executeMethod U3d.EditorRun.LoadSaveScenes -quit -batchmode")
4
+ end
@@ -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,9 @@
1
+ fileFormatVersion: 2
2
+ guid: c132847aef6384146a622760c1c1a559
3
+ folderAsset: yes
4
+ timeCreated: 1500637649
5
+ licenseType: Pro
6
+ DefaultImporter:
7
+ userData:
8
+ assetBundleName:
9
+ assetBundleVariant:
@@ -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
+ }