How Do I Store Bolt Entity Prefabs Outside the App?

I'm developing a multiplayer app for the Oculus Quest with Unity ver. 2019.4.4f1. I have a large number of mp3 files which I want to instantiate as Bolt Entity prefabs at various points during gameplay. Unfortunately, if I have too many of these mp3's in the app itself, it crashes the app in my Quest. So I need to store them outside the app, maybe in a cloud service like AWS, and get them into the app to be instantiated as needed. Can anyone provide any guidance? Thanks!

Answers

  • Hi @OjosLindos ,

    The suggestion, in this case, is to have only one Bolt Entity, but with custom properties that would allow you to select which file to Load.

    This can be as simple as a String with the MP3 file name, for example.
    When instantiating the Entity, you can pass a Protocol Token along with it, so when it is instantiated on the clients, you know which file to load.

    Take a look here:
    1. https://doc-api.photonengine.com/en/bolt/current/class_photon_1_1_bolt_1_1_bolt_network.html#a0329380305e60db0a90793ad157dc525
    2. https://doc.photonengine.com/en-us/bolt/current/in-depth/protocol-tokens

    --
    Ramon Melo
    Photon Bolt Team
  • Thanks for this information, Ramon. Could you by any chance point me toward any guidance on how to get the mp3's from the Cloud into the app (to then be gotten into the Bolt Entity prefab) during gameplay? I'm kind of new to the Cloud. I'm currently use Google Cloud.
  • Hi @OjosLindos ,

    Unfortunately, I can't help with that, as this is not related to Photon Bolt, but you should be able to find tutorials across the internet for doing so.

    As explained on the links I sent above, you can use a string with the ID of your MP3 file that you want to load. This will be synchronized across the players, so each individual client can download/load/play the specific audio.

    --
    Ramon Melo
    Photon Bolt Team