Search Unity

I can't figure out the best direction.

Discussion in 'Scripting' started by chronochris, Jul 28, 2015.

  1. chronochris

    chronochris

    Joined:
    Jun 7, 2015
    Posts:
    61
    I need to develop a business process that will create assets that can be brought into a Unity Application at runtime. I have made several threads about this, and tried a few different things. I have spent a lot of time in the wrong direction. I have tried making it easy for the users, by having the application load obj files and create a gameobject during runtime. All the user would have to do is select the file. This is proving too difficult. I got the script from here. http://wiki.unity3d.com/index.php?title=ObjImporter. The script from this site only works on .obj, it doesn't get the material, so the object is pink, and if any of them have more than 6500 vertices, nothing gets imported. I think this is difficult to convey but even just using .obj might be fine. Since the users might just need to convert on their own accord

    So I'm thinking the process might have to be a bit more complicated. Like give the user the application before being built, and have them import all the assets in the Editor, and then build the project. From there the application can use AssetBundles or WWW to load the assets at runtime?

    AssetBundles? Okay. How do I do this at runtime? You have to do it before runtime? Welp how do you do this programmatically, because sometimes they will have thousands of objects to import. Great, what is an asset bundle? is it an entire object? I've looked at the manual, but I just can't figure out how this works with the script, and how to do it.

    WWW? I'm going to look into this one next, and play around. But, I'm just getting frustrated with Unity. I'm thinking I might wait for the Hololens SDK, or switch to a different engine that is supporting hololens because I can't keep wasting my time in the wrong direction.

    TLDR: Has anyone loaded in entire objects with either WWW or AssetBundles and can provide some scripting examples?
     
  2. chronochris

    chronochris

    Joined:
    Jun 7, 2015
    Posts:
    61
  3. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    The best direction is north. Failing that try south. There is also east, west, up and down. You can run with any combination of those. Or you can write a custom direction involving wormholes and quantum tunnelling.

    But seriously, the responsibility to evaluate methods for your game is yours. Starting a dozen new threads on the topic won't make the advice any better. Go and build a quick prototype and see what happens.
     
    LeftyRighty likes this.
  5. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    don't try North by Northwest though... things get rather confused in that direction :)
     
    DonLoquacious and Kiwasi like this.
  6. DonLoquacious

    DonLoquacious

    Joined:
    Feb 24, 2013
    Posts:
    1,667
    Dang it... I broke the jewel-encrusted egg again...
     
  7. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
  8. DonLoquacious

    DonLoquacious

    Joined:
    Feb 24, 2013
    Posts:
    1,667
    He's seen it, we've linked it before, and I think he solved this problem already but only actually reported so in one of his other threads. *shrugs*
     
  9. chronochris

    chronochris

    Joined:
    Jun 7, 2015
    Posts:
    61
    Thats the issue, none of these will work unless unity has already imported them from the editor. I need them to import objects that unity has no idea existed when the application was built. AssetBundles seem to only work using the editor. :p

    But yes, my new direction is less intuitive to the user, and I will have to use AssetBundles.

    P.S. try not to be condescending. I literally knew nothing about what unity was capable of, but going the wrong direction for months was frustrating. I don't find any of the AssetBundles examples intuitive. But, I'll figure it out, all I was asking for if anyone has a working example I can learn off of.
     
  10. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    The main issue was that you did ask for scripting examples and not for a working (complete) example. And you started multiple threads.
     
  11. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    There are complete code examples... in the docs. That's the whole point of the docs.
     
    Kiwasi likes this.