示例#1
0
	void Awake()
	{
		if ( control == null )
		{
			DontDestroyOnLoad(gameObject);
			control = this;

			// this is due to JIT compilation required for the binary formatter, which
			// is NOT allowed on iOS.
			Environment.SetEnvironmentVariable("MONO_REFLECTION_SERIALIZER", "yes");

			// slurp
			control.Load();
		}
		else if ( control == this )
		{
			Destroy(gameObject);
		}
	}
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     pauseMenu.SetActive(false);
     ScoreControl.Load();
 }