Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Using external levels

Discussion in 'Scripting' started by flash, Apr 21, 2008.

  1. flash

    flash

    Joined:
    Jan 26, 2008
    Posts:
    54
    Is there a way to load a level from a different build into my current build?

    So instead of building all of the levels into one file, is it possible to have separate *.unity3d files for each level? and then change levels within unity seamlessly?

    I'm pretty sure I can do this using some form of HTML Javascript interaction, but I was curious as to the possibilities of doing this inside of unity.

    Any ideas?

    Thanks

    Flash
     
  2. ratamorph

    ratamorph

    Joined:
    Sep 2, 2007
    Posts:
    458
    I'd like to know about this aswell, I was trying to make a unity app player this way but couldn't find information on how to do it, so I asumed it was not supported.
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    The short answer is "no" although a number of us have requested this. The longer answer is "yes you can" if you build it yourself and the basics of how this would be accomplished can be found by searching for "import" here in the forums and taking a look at some of the sample scripts in the Wiki.
     
  4. jeffcraighead

    jeffcraighead

    Joined:
    Nov 15, 2006
    Posts:
    740
    You could do Application.LoadURL() to point to a separate web build for each level. And using some javascript you could probably encode the URL into the HTML of the page so that you can change it w/o recompiling.
     
  5. aaron-parr

    aaron-parr

    Joined:
    Apr 22, 2007
    Posts:
    577
    That is an interesting idea with regard to using JavaScript to load a new web deployed "level". Can Unity be fed information from a cookie as well? That way whatever game data you have could be sent to the next "level".
     
  6. jeffcraighead

    jeffcraighead

    Joined:
    Nov 15, 2006
    Posts:
    740
    Unity can work with cookies. Do a search for CookieCutter.