Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

How to deploy the game to my http server after building it? What files do i need to copy?

Discussion in 'Project Tiny' started by Wen-Li, Dec 14, 2018.

  1. Wen-Li

    Wen-Li

    Joined:
    Nov 27, 2015
    Posts:
    4
    There are many files in .../html5/development folder. Do I need copy all of them or just files under "/bin" folder to my html server. Many thanks.

    By the way: I saw a script reference in index.html :
    <script src="/~project/TinyExport/AudioForest/html5/development/ScriptAssemblies/tsc-emit.js"></script>. This ndicates that I need files outside the "/bin" folder.
     
  2. dwiperidream

    dwiperidream

    Joined:
    Nov 12, 2015
    Posts:
    7
    If you want to deploy to a separate web server, I think you have to build it in release mode. In the Unity editor if you select your .utproject file, you should be able to see in the inspector a section called Build Configuration. If you choose "Release" from the drop down menu and press Build, there will be a ../html5/release/bin folder created with a minified version of the game. Deploying that should work without any extra dependencies - the index.html will have only a reference to a "game.js" file. Hope that helps.
     
  3. Nkon

    Nkon

    Unity Technologies

    Joined:
    Jun 12, 2017
    Posts:
    65
    The reference mentioned in the original post is generated because the option "Link To Source" is enabled in Tiny build settings.

    If this option is disabled, a file named "code.js" will be generated into the same folder with the rest of the export and no references to other folders remain in the index.html.

    When deploying you should make a release build just like mentioned in the previous post. This will be the most lightweight option and only contains one file.

    Cheers!