using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using ORKFramework;
public class ORKEnableRealTime : MonoBehaviour {
public UniStormSystem uS;
// Use this for initialization
void Start () {
//DontDestroyOnLoad (this.gameObject);
uS = GameObject.Find ("UniStorm System").GetComponent<UniStormSystem> ();
}
// Update is called once per frame
public void Update () {
//ORK.Game.Variables.GetBool("useRealTime");
if (ORK.Game.Variables.Check ("useRealTime", true)) {
uS.RealWorldTime = UniStormSystem.EnableFeature.Enabled;
//ORK.Game.Variables.Set ("useRealTime", true);
}
if (ORK.Game.Variables.Check ("useRealTime", false)) {
uS.RealWorldTime = UniStormSystem.EnableFeature.Disabled;
}
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!
Starting a new game will reset variables and loading a game will reset it to the saved variables.
E.g. having that setting in the main menu would result in the setting being reset when starting a new game or loading a game.
You could use PlayerPrefs as an alternative - ORK 2.17.0 introduced an option to use them in option menus instead of game variables.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!