Example #1
0
    public override void OnStop()
    {
        base.OnStop();

        if (_debugGUI)
        {
            // Pop visibility state
            _debugGUI.SetTargetVisible <LodDataMgrAnimWaves>(_visWaves);
            _debugGUI.SetTargetVisible <LodDataMgrFoam>(_visFoam);

            _debugGUI._guiVisible     = _showGUI;
            _debugGUI._showSimTargets = _showTargets;

            _debugGUI = null;
        }
    }
Example #2
0
    public override void OnPlay()
    {
        base.OnPlay();

        _debugGUI = FindObjectOfType <OceanDebugGUI>();

        if (_debugGUI)
        {
            // Save visibility state
            _visWaves = _debugGUI.GetTargetVisible <LodDataMgrAnimWaves>();
            _visFoam  = _debugGUI.GetTargetVisible <LodDataMgrFoam>();

            _debugGUI.SetTargetVisible <LodDataMgrAnimWaves>(true);
            _debugGUI.SetTargetVisible <LodDataMgrFoam>(true);

            _showGUI     = _debugGUI._guiVisible;
            _showTargets = _debugGUI._showSimTargets;

            _debugGUI._guiVisible     = false;
            _debugGUI._showSimTargets = false;
        }
    }