Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Convert fbx model to gameobjet

Discussion in 'Scripting' started by siddharth3322, Mar 21, 2015.

  1. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    For my game I am fetching 3d objects from online server. So I receive fbx object as imported file. So at runtime I want to use this file in game. I need some suggestion to convert this fbx object model into unity gameobject.

    Means I need some code to convert this file so that I can use it in actual game. Please give some suggestion in this. If you have any other way then mention that also.
     
  2. knr_

    knr_

    Joined:
    Nov 17, 2012
    Posts:
    258
    Can the 3D objects on the server be a Asset Bundle instead? That would make it really simple, I would think.
     
  3. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @rnakrani , Thanks for you quick reply. Please elaborate suggestion because I got little from it. But I think you are right in this.
     
  4. knr_

    knr_

    Joined:
    Nov 17, 2012
    Posts:
    258
    There is a lot of material, so I will provide a link (assumes Unity 5):

    http://docs.unity3d.com/Manual/AssetBundlesIntro.html
    http://docs.unity3d.com/Manual/BuildingAssetBundles5x.html

    Basically, you can take objects in your project and "package" them as a downloadable, streamed asset that your project will recognize once it is downloaded. Then you can look into that package, load things (prefabs, game objects, etc...) out of that package and instantiate them as necessary in your project.

    So, in theory, you could create a prefab with an fbx in it, build an asset bundle out of it, put it somewhere on the internet, then from your Unity application / game you can request the asset bundle (using the URL to it)... if it finds it at that location it will begin downloading and once complete you can get access to that fbx and do what you need to do.

    Hope this helps.

    Rajkot? My father is from Jalia. :)
     
  5. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    Okay I got your point. My client has not any programming knowledge and I have to work with this type of client.
    He just only know about copy paste work on server side.

    What is my thinking about this - 3d designer give then fbx object model and he put same model at server at specified location and on updation my game will check for any changes. If found any thing new then import that asset into actual project.

    If I can perform similar thing with any other solution then please give me.