private void OnActivePaletteTypeChanged(PaletteType type)
        {
            var oldType = _guiState.ActivePaletteType.Value;

            _editService.Edit($"Change Palette Type To {type.ToString()}",
                              () => _guiState.ActivePaletteType.Value = type,
                              () => _guiState.ActivePaletteType.Value = oldType, false);
        }
Beispiel #2
0
        public static Material LoadMaterial(string _materialID, PaletteType _type = PaletteType.diffuse_saturated)
        {
            Material mat = Resources.Load <Material>(string.Format("{0}{1}",
                                                                   string.Format("{0}{1}/", MATERIALS_REOURCES_PATH, _type.ToString()), _materialID));

            if (mat == null)
            {
                mat = Resources.Load <Material>(string.Format("{0}{1}_{2}", MATERIALS_REOURCES_PATH, "white", "pure"));
                //Debug.LogFormat("Material not found {0}_{1} in path {2}", _color, _tone, MATERIALS_REOURCES_PATH);
            }
            return(mat);
        }