Advertisement
Guest User

BaseObjectsLoader.cs

a guest
Dec 29th, 2018
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class BaseObjectLoader : MonoBehaviour {
  5.  
  6. // Use this for initialization
  7. void Start ()
  8. {
  9. //just a backup if we try to run this scene without going through base objects; just load baseobjects.
  10. if (GameStateManager.instance == null)
  11. {
  12. GameStateManager.OverrideStartingLevelFileName = Application.loadedLevelName;
  13. GameStateManager.OverrideStartingGameState = WantedGameState;
  14.  
  15. (GameObject.FindGameObjectWithTag("SceneRoot")).SetActive(false);
  16. Application.LoadLevel("BaseObjects");
  17. }
  18. }
  19.  
  20. public GameStateManager.eGameState WantedGameState = GameStateManager.eGameState.eFreePlay;
  21.  
  22. // Update is called once per frame
  23. void Update ()
  24. {
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement