// Use this for initialization void Start() { string stateInfo = SteeringControls.instance().stateInfo(); Text outputTo = GetComponent <Text>(); if (outputTo == null) { outputTo = gameObject.AddComponent <Text>(); } outputTo.text = stateInfo; }
void Awake() { if (!_isActive) { DontDestroyOnLoad(this.gameObject); _isActive = true; //init Steering = SteeringControls.instance(); //Trackcapture = sceneTrackdata.instance(); //SceneChanger = GetComponent<changeScene>(); //unsign monobehaviors for more easy to bind gui events userProfile = GetComponent <ProfileManager>(); testSchema = GetComponent <TestSchema>(); menuUI = GetComponent <MenuGui>(); screensize = new Rect(); screensize.x = Screen.width; screensize.y = Screen.height; } else { Destroy(this.gameObject); } }