void OnEnable()
    {
        _applicationManager = ApplicationManager.instance;
        _audioSource        = GetComponent <AudioSource>();

        _downloadProgress = 0f;

        if (_materialController != null)
        {
            _materialController.OnStart();
        }

        if (_applicationManager != null)
        {
            string lockedDown = _applicationManager.GetGameState("LOCKDOWN");

            if (string.IsNullOrEmpty(lockedDown) || lockedDown.Equals("TRUE"))
            {
                if (_materialController != null)
                {
                    _materialController.Activate(false);
                }
                if (_unlockedLight != null)
                {
                    _unlockedLight.SetActive(false);
                }
                if (_lockedLight != null)
                {
                    _lockedLight.SetActive(true);
                }
                _downloadComplete = false;
            }
            else if (lockedDown.Equals("FALSE"))
            {
                if (_materialController != null)
                {
                    _materialController.Activate(true);
                }
                if (_unlockedLight != null)
                {
                    _unlockedLight.SetActive(true);
                }
                if (_lockedLight != null)
                {
                    _lockedLight.SetActive(false);
                }
                _downloadComplete = true;
            }
        }

        ResetSoundAndUi();
    }
    void OnEnable()
    {
        // Fetch application Database, Game Scene Manager and the
        // AudioSource Component
        _applicationManager = ApplicationManager.instance;
        _audioSource        = GetComponent <AudioSource>();

        // Reset Download Progress
        _downloadProgress = 0.0f;

        // Instruct the material controller to register itself with the gamescene
        // manager so that it can be restored on exit.
        if (_materialController != null)
        {
            _materialController.OnStart();
        }

        // If we have an app database
        if (_applicationManager != null)
        {
            // Get the state of Lockdown if it exists
            string lockedDown = _applicationManager.GetGameState("LOCKDOWN");

            if (string.IsNullOrEmpty(lockedDown) || lockedDown.Equals("TRUE"))
            {
                if (_materialController != null)
                {
                    _materialController.Activate(false);
                }
                if (_unlockedLight)
                {
                    _unlockedLight.SetActive(false);
                }
                if (_lockedLight)
                {
                    _lockedLight.SetActive(true);
                }
                _downloadComplete = false;
            }
            else
            if (lockedDown.Equals("FALSE"))
            {
                if (_materialController != null)
                {
                    _materialController.Activate(true);
                }
                if (_unlockedLight)
                {
                    _unlockedLight.SetActive(true);
                }
                if (_lockedLight)
                {
                    _lockedLight.SetActive(false);
                }
                _downloadComplete = true;
            }
        }

        // Set all UI Elements to starting condition
        ResetSoundAndUI();
    }