Example #1
0
    /// <summary>
    /// Grabs directory, finds first nonexistant directory
    /// </summary>
    void Start()
    {
        JSONconfig config = GameObject.Find("ROOT/GAMEMANAGER").GetComponent <JSONconfig>();
        string     dir    = "Exports";

        if (config.loadedConfig != null)
        {
            dir = config.loadedConfig.imageExportPath;
        }

        int directoryNumber = 0;


        if (!Directory.Exists(dir))
        {
            Directory.CreateDirectory(dir);
        }

        while (Directory.Exists(dir + "/ScreenShots" + directoryNumber.ToString()))
        {
            directoryNumber++;
        }

        _directoryName = dir + "/ScreenShots" + directoryNumber.ToString();

        Directory.CreateDirectory(_directoryName);

        _graphCamera = GetComponent <Camera>();

        _messageText         = GameObject.Find("ROOT/UI/CPANEL_LEFT/CPANEL_BOTTOM_L/SCREENSHOT_MESSAGE").GetComponent <Text>();
        _messageText.enabled = false;
    }
Example #2
0
    public Slider _radSlider;                  //slider reference

    /// <summary>
    /// Grabs configurations and script references
    /// </summary>
    void Start()
    {
        _configuration    = _gameManager.GetComponent <JSONconfig>();
        _inflateIncrement = _configuration.loadedConfig.inflateIncrement;
        _deflateIncrement = _configuration.loadedConfig.deflateIncrement;
        _sliderHandler    = _gameManager.GetComponent <gm_slidebarhandler>();
        _uiUpdate         = _gameManager.GetComponent <gm_uiValuesUpdate>();
    }