Skip to content

Commit 2a86873

Browse files
authored
using --wasm option in runtime builder (#45)
1 parent 7e53e21 commit 2a86873

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Editor/EcsactRuntimeBuilder.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public static class EcsactRuntimeBuilder {
105105
private static Dictionary<long, int> _subcommandProgressIds = new();
106106
private static Dictionary<long, string> _subcommandProgressNames = new();
107107
private static EcsactSettings? _settings;
108+
private static EcsactRuntimeSettings? _rtSettings;
108109

109110
public struct Options {
110111
public List<string> ecsactFiles;
@@ -129,6 +130,8 @@ public static void Build
129130
return;
130131
}
131132

133+
_rtSettings = EcsactRuntimeSettings.Get();
134+
132135
string runtimeBuilderExecutablePath =
133136
EcsactSdk.FindExecutable("ecsact_rtb");
134137

@@ -262,6 +265,12 @@ public static void Build
262265
proc.StartInfo.Arguments += " --debug ";
263266
}
264267

268+
if(_rtSettings.systemImplSource == Ecsact.SystemImplSource.WebAssembly) {
269+
proc.StartInfo.Arguments += " --wasm=wasmer ";
270+
} else if(_rtSettings.systemImplSource == Ecsact.SystemImplSource.Csharp) {
271+
proc.StartInfo.Arguments += " --wasm=none ";
272+
}
273+
265274
proc.StartInfo.Arguments += "--output=\"";
266275
proc.StartInfo.Arguments += Path.GetFullPath(
267276
_settings.runtimeBuilderOutputPath

Editor/Importer/EcsactImporter.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public override void OnImportAsset(AssetImportContext ctx) {
5959
};
6060

6161
try {
62-
UnityEngine.Debug.Log(codegen.StartInfo.Arguments);
6362
codegen.Start();
6463
codegen.BeginOutputReadLine();
6564
codegen.BeginErrorReadLine();

0 commit comments

Comments
 (0)