Quantcast
Channel: Questions in topic: "webgl"
Viewing all articles
Browse latest Browse all 2390

WebGl build from command line doesn't work.

$
0
0
I have a WebGL project. It builds and works when I build it from Editor in a regular way: File -> Build Settings or Build and Run it works But when I build it with the script it doesn't. I have a strong feeling that I missing some settings or options in my code. Because "regular way build" is 100mb, but code build is only 13mb. Here is my build code var buildPlayerOptions = new BuildPlayerOptions(); buildPlayerOptions.scenes = new[] { "Assets/Scenes/SampleScene.unity" }; buildPlayerOptions.locationPathName = "WEBGL"; buildPlayerOptions.target = BuildTarget.WebGL; buildPlayerOptions.options = BuildOptions.None; PlayerSettings.WebGL.analyzeBuildSize = false; PlayerSettings.WebGL.memorySize = 256; PlayerSettings.WebGL.dataCaching = true; PlayerSettings.WebGL.compressionFormat = WebGLCompressionFormat.Gzip; PlayerSettings.runInBackground = true; PlayerSettings.defaultScreenHeight = 480; PlayerSettings.defaultScreenWidth = 640; PlayerSettings.WebGL.linkerTarget = WebGLLinkerTarget.Both; PlayerSettings.WebGL.debugSymbols = true; PlayerSettings.WebGL.exceptionSupport = WebGLExceptionSupport.FullWithStacktrace; var buildReport = BuildPipeline.BuildPlayer(buildPlayerOptions); if (buildReport.summary.result == BuildResult.Succeeded) { EditorApplication.Exit(0); } else { EditorApplication.Exit(1); }

Viewing all articles
Browse latest Browse all 2390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>