Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class BaseObjectLoader : MonoBehaviour {
- // Use this for initialization
- void Start ()
- {
- //just a backup if we try to run this scene without going through base objects; just load baseobjects.
- if (GameStateManager.instance == null)
- {
- GameStateManager.OverrideStartingLevelFileName = Application.loadedLevelName;
- GameStateManager.OverrideStartingGameState = WantedGameState;
- (GameObject.FindGameObjectWithTag("SceneRoot")).SetActive(false);
- Application.LoadLevel("BaseObjects");
- }
- }
- public GameStateManager.eGameState WantedGameState = GameStateManager.eGameState.eFreePlay;
- // Update is called once per frame
- void Update ()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement