Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Manual loading scene inside editor

Discussion in 'Editor & General Support' started by tag-Ancel, Jan 19, 2016.

  1. tag-Ancel

    tag-Ancel

    Joined:
    Oct 28, 2015
    Posts:
    11
    Hi there,

    Currently, I am working on a unity project. My code have the same behavior when my app run on device and the editor. All scene is loaded scenes from bundles, except the login scene.

    In this way, I have to build bundle every time when i make a tiny change to my scene.
    this is time-consuming and kind of annoying.
    So, is there possible way to let me to make code that will have different behavior in editor and on device. on Device I loaded scenes from bundles, in editor I want loaded it directly without to add scene to build setting.

    If it possible , it will save me a lot of time.
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
  3. tag-Ancel

    tag-Ancel

    Joined:
    Oct 28, 2015
    Posts:
    11
    Thanks, I know those platform defines. Currently, my problem is how load scene directly without to add them to the build setting when i in play mode in edtior.
     
  4. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
  5. tag-Ancel

    tag-Ancel

    Joined:
    Oct 28, 2015
    Posts:
    11
    Thanks, it seems this only work on unity 5.x . unity 4 seems don't have a function to load scene without add the scene to building setting。

    Eventually, when the emulation mode is turned on ,I write a piece of code to add scene to build setting. when the emulation mode is turned off , i remove the scene i add from building setting.
     
  6. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Yes the AssetBundleManager relies on the new assetbundle system in 5.0