UnrealEngineHTML5 / Documentation

533 stars 183 forks source link

Unable to package project for HTML5 platform #13

Closed Siphonn closed 4 years ago

Siphonn commented 4 years ago

Hello, I have been able to downloaded and run the UnrealEngineHTML5 but when I go the package the project

The Unreal doc for developing HTML5 Projects page opens (https://docs.unrealengine.com/en-US/Platforms/HTML5/GettingStarted/index.html).

In Project Settings - Platforms, there is no section for HTML5.

I have followed the documentation til this point (Using Git Bash, running Setup.bat, HTML5Setup.sh, GenerateProjectFiles.bat, then building UE4 with VS2017) and am unsure what to do next. To make sure the engine is working correctly I built the project out to windows with no issue.

Any advice on what to do next would be appreciated.

Mosel3y commented 4 years ago

Hi, Check the help here:

https://github.com/UnrealEngineHTML5/Documentation/blob/master/Platforms/HTML5/HowTo/README.4.faq.UE4.HTML5.md#attempting-to-package-for-html5-instead-brings-up-the-help-page

I am also having this issue, so I will let you know when I solve it.

Mosel3y commented 4 years ago

Hi @Siphonn This is working for me now. I started with a fresh clone of this repository.

Using git bash:

  1. Run Setup.bat
  2. Run Engine/Platforms/HTML5/HTML5Setup.sh
  3. At this point I open Platforms\HTML5\Source\Programs\UnrealBuildTool\HTML5SDKInfo.cs and at line 27 change PYTHON_VER, to match the version at Platforms\HTML5\Build\emsdk\emsdk-1.39.0\python, which is "3.7.4_64bit".
  4. Run GenerateProjectFiles.bat
  5. Compile engine
  6. Package Project > HTML5

Works fine.

Siphonn commented 4 years ago

I performed the same steps as those you listed above and was able to package to HTML5. Thanks you Mosel3y you're a gent. I appreciate your help with this issue. 😄

As someone who is new to HTML5 builds are their any sites you could recommend to test a HTML5 build? I made a mistake in assuming I could run the .html file on computer to test the build.

Mosel3y commented 4 years ago

@Siphonn Cool, glad it worked for you.

You can run it locally actually, Nick explains it here

However since you seem to be on Python 3, the command is different, it's now:

python -m http.server 8000

If you run that command in the folder containing your packaged game, then open your browser and go to http://localhost:8000/, and select your html file.

Siphonn commented 4 years ago

@Mosel3y Looks like Firefox has some issues running the build but I can confirm that it works in Chrome. Thank again.