Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Answered] Facebook+WebGL+AssetBundles

Discussion in 'WebGL' started by GilesDMiddleton, Mar 26, 2018.

  1. GilesDMiddleton

    GilesDMiddleton

    Joined:
    Aug 12, 2015
    Posts:
    91
    Hi,

    I'm trying to reduce the initial load time of my game that has 285mb of graphics, so i've been looking at asset bundles, but I don't see any mention of these being included in the upload to facebook.

    As not everyone has a server, Is it possible for Facebook to host my asset bundles as separate files on their servers that I can reference?

    Do I have to copy them into the build output folder before the 7z is made?

    Thanks
     
  2. GilesDMiddleton

    GilesDMiddleton

    Joined:
    Aug 12, 2015
    Posts:
    91
    I don't know if Asset Bundles are the right way to go or not for WebGL, but i've had an answer to this question on reddit, which lead me to the secret folder called StreamingAssets.

    Along with this code example which doesn't compile (the method is Send()), i've successfully improved my load time significantly and hosted content on facebook's servers. https://docs.unity3d.com/ScriptReference/Application-streamingAssetsPath.html

    (Tip: Call the method with StartCoRoutine(Example()));