Пример #1
0
    void InitializeSettings()
    {
        if (settingsInitialized == false)
        {
            SS = new SmoothnessSettings();

            _SampleColorMap1 = new Texture2D(1, 1, TextureFormat.ARGB32, false, true);
            _SampleColorMap1.SetPixel(1, 1, SS.SampleColor1);
            _SampleColorMap1.Apply();

            _SampleColorMap2 = new Texture2D(1, 1, TextureFormat.ARGB32, false, true);
            _SampleColorMap2.SetPixel(1, 1, SS.SampleColor2);
            _SampleColorMap2.Apply();

            _SampleColorMap3 = new Texture2D(1, 1, TextureFormat.ARGB32, false, true);
            _SampleColorMap3.SetPixel(1, 1, SS.SampleColor3);
            _SampleColorMap3.Apply();

            settingsInitialized = true;
        }
    }
Пример #2
0
    private void InitializeSettings()
    {
        if (_settingsInitialized)
        {
            return;
        }
        _settings = new SmoothnessSettings();

        _sampleColorMap1 = new Texture2D(1, 1, TextureFormat.ARGB32, false, true);
        _sampleColorMap1.SetPixel(1, 1, _settings.SampleColor1);
        _sampleColorMap1.Apply();

        _sampleColorMap2 = new Texture2D(1, 1, TextureFormat.ARGB32, false, true);
        _sampleColorMap2.SetPixel(1, 1, _settings.SampleColor2);
        _sampleColorMap2.Apply();

        _sampleColorMap3 = new Texture2D(1, 1, TextureFormat.ARGB32, false, true);
        _sampleColorMap3.SetPixel(1, 1, _settings.SampleColor3);
        _sampleColorMap3.Apply();

        _settingsInitialized = true;
    }
Пример #3
0
    public void SetValues(ProjectObject projectObject)
    {
        InitializeSettings();
        if (projectObject.SS != null)
        {
            SS = projectObject.SS;
        }
        else
        {
            settingsInitialized = false;
            InitializeSettings();
        }

        _SampleColorMap1.SetPixel(1, 1, SS.SampleColor1);
        _SampleColorMap1.Apply();

        _SampleColorMap2.SetPixel(1, 1, SS.SampleColor2);
        _SampleColorMap2.Apply();

        _SampleColorMap3.SetPixel(1, 1, SS.SampleColor3);
        _SampleColorMap3.Apply();

        doStuff = true;
    }
Пример #4
0
    public void SetValues(ProjectObject projectObject)
    {
        InitializeSettings();
        if (projectObject.SmoothnessSettings != null)
        {
            _settings = projectObject.SmoothnessSettings;
        }
        else
        {
            _settingsInitialized = false;
            InitializeSettings();
        }

        _sampleColorMap1.SetPixel(1, 1, _settings.SampleColor1);
        _sampleColorMap1.Apply();

        _sampleColorMap2.SetPixel(1, 1, _settings.SampleColor2);
        _sampleColorMap2.Apply();

        _sampleColorMap3.SetPixel(1, 1, _settings.SampleColor3);
        _sampleColorMap3.Apply();

        _doStuff = true;
    }