Search Unity

Sharing a runtime created gameobject with all other clients with an AssetBundle?

Discussion in 'Asset Bundles' started by fraeri, Feb 4, 2019.

  1. fraeri

    fraeri

    Joined:
    Nov 8, 2018
    Posts:
    29
    Hi,
    I am working on a project where user can import OBJ files and place it's gameobject in the scene.
    No problems with that at all.

    What I want now is that the created gameobject(with scale, rot, pos, and components) of the obj is somehow uploaded to a server to make it accessible for the other users.

    I stumbled across assetBundles and the possibilities to download game objects and instantiate them in the scenes but I also understand that they only can be created in the editor itself, am I right? So I guess it's not an option.

    Ideas I would come up with:
    - uploading the gameobject itself somehow and the program of the other users are just checking that folder if there is something new inside.
    - building the assetbundle on the server itself? Is that even possible?


    Got anyone a helpful solution to share user created gameobjects with other users?

    Thanks,
    Eric


    p.s. Sidequestion: Importing a assetBundle once doesn't saves it forever, does it? I need to download the bundle at every start?
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    2,248
    Asset bundles are not made for multiplayer, so you can probably stop here and look for other solutions.
    Asset bundles are made for downloading game features (textures, scenes, models, etc.). For example, you can ship game with few levels built in and additional levels can be downloaded from server.
     
  3. HonorableDaniel

    HonorableDaniel

    Joined:
    Feb 28, 2007
    Posts:
    2,814
    What about running a server that converts files (FBX, OBJ, etc.) into AssetBundles for the end users? So the process would look like this:
    1) User uploads FBX file.
    2) Server with Unity running converts file to AssetBundle.
    3) User downloads compressed AssetBundle for use in the application.

    That way users can import any kind of file they want for use in the app (any file format that Unity supports). Has anyone done this before?
     
  4. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,881
    I think you can get the user mod friendly API you want with TNet3. Check it out and see if you think it will work for you.