Giter Site home page Giter Site logo

enhanced-scene-manager's Introduction

Enhanced-Scene-Manager

This plugin allow you to create levels using multiple scenes to optimize your workflow and your application.

 

How to setup ?

1 - Add the plugin to your project

This plugin should be cloned into your Unity project to access new updates. It's highly recommended to use git submodules : https://git-scm.com/book/en/v2/Git-Tools-Submodules

  • Method 1 (Recommended) : Create a folder "Enhanced Scene Manager" into your Asset folder and clone the project into it from new repository or git submodule.
  • Method 2 : Download the project .zip file and unpack it directly in your Asset folder.

 

2 - Setup Enhanced Scene Manager in your project

Once the addon is imported in your project, two new types of assets appeared in your create panel.

  • Scene Bundle : This asset is a group of scenes you want to load simultaneaously.
  • Scene Bundle List : The equivalent of build setting scene. Group every Scene Bundle you want to use and build in your application. Contains also a Persistant Scene Bundle that will be loaded only once and persist while application is running.

To setup this, go to "Window/Enhanced Scene Manager" to deploy the Enhanced Scene Manager window.

By default the window suggest you to create a new Scene Bundle List. Create a new one. You also can create a new Scene Bundle List from "Create/Enhanced Scene Manager/Scene Bundle List".

Enhanced Scene Manager : Create Scene Bundle List

- The Scene Bundle List

Scene Bundle List

Once your Scene Bundle List is ready, you can fill it with Scene Bundles, refer a Persistant Scene Bundle if your application architecture requires it. The first bundle in the Scene Bundles List will be the first loaded in the application !.

(tip : Lock the inspector, select the Scene Bundles and click + button to directly refer selected Scenes Bundles).

- The Scene Bundle

Scene Bundle

To create a new Scene Bundle, go to "Create/Enhanced Scene Manager/Scene Bundle". In this one, refer all the Scene Assets you want to load into it .

(tip : Lock the inspector, select the Scene Assets and click + button to directly refer selected Scenes).

Register your bundles in your current Scene Bundle List to add it to the build setting and load/access it from the Enhanced Scene Manager Window.

- Enhanced Scene Manager Window

Enhanced Scene Manager Window

Deploy it from "Window/Enhanced Scene Manager".

On Enhanced Scene Manager, select Scene Bundle to load it and select A to select his asset. You also can set the current used Scene Bundle List (Note : For example you can have multiple Scene Bundle list if you want to build levels separately for prototyping or debug for example).

 

3 - Load a Scene Bundle

Loading a scene bundle is pretty easy. You just need a Scene Bundle reference and call the Load() method from it.

public void Load();
using UnityEngine;
using SorangonToolset.EnhancedSceneManager;

public class LevelLoader : MonoBehaviour{
    [SerializeField] private SceneBundle levelToLoad = null;

    public void OnGUI(){
        if(GUILayout.Button("LoadLevel")){
            //Just call the Load() method from Scene Bundle
            levelToLoad.Load();
        }
    }
}

You also can call LoadAsync().This is recommended to use more often than Load().

public void LoadAsync();

You can call those methods from a Unity Event.

! The level you want to load must be registered in the Current Scene List !

 

Recommended Usages

- Manage your application with Persistant Scene Bundle.
The Persistant Scene Bundle can manage the core logic of your application. Use those scenes to setup your game manager, loading screens, runtime debugging tools and much more !

- Separate your datas to make teamwork easier.
For example, for a level you can make a logic scene that manage the logic and gameplay part and also make a graphic level on which you will create your level environment art. This allow you and your team to work simultaneously on the same level on his proper part without having merge problems.

- Reuse your scenes to reduce application weight.
For example, you want to create 2 levels in a same environment. With this system, you san separate the graphic part of the level in a scene and use 2 others one to manage different levels logic then reference the same graphic scene in two differents bundles.

enhanced-scene-manager's People

Contributors

sorangon avatar

Stargazers

Dmitry Frolov avatar ZTIF avatar Bruno Mikoski avatar Keiran avatar rStar avatar Younes Balandjian avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.