private void OnDisable()
 {
     EditorPrefsExt.SetEnum(_sourceTypeKey, _sourceType);
     EditorPrefsExt.SetAsset(_customMeshKey, _customMesh);
     EditorPrefs.SetInt(_subMeshIndexKey, _subMeshIndex);
     EditorPrefs.SetInt(_uvIndexKey, _uvIndex);
 }
 private void OnEnable()
 {
     _sourceType   = EditorPrefsExt.GetEnum(_sourceTypeKey, MeshSourceType.SelectedObject);
     _customMesh   = EditorPrefsExt.GetAsset <Mesh>(_customMeshKey);
     _subMeshIndex = EditorPrefs.GetInt(_subMeshIndexKey, -1);
     _uvIndex      = Mathf.Clamp(EditorPrefs.GetInt(_uvIndexKey, 0), 0, 4);
 }
Exemplo n.º 3
0
 private void OnDisable()
 {
     EditorPrefsExt.SetEnum(_sourceTypeKey, _sourceType);
     EditorPrefs.SetInt(_materialIdKey, _materialId);
     EditorPrefs.SetString(_propertyNameKey, _propertyName);
     EditorPrefsExt.SetAsset(_customTextureKey, _customTexture);
     EditorPrefs.SetInt(_filterModeKey, _filterMode);
     EditorPrefs.SetBool(_repeatingKey, _repeating);
     EditorPrefsExt.SetColor(_colorKey, _color);
     EditorPrefsExt.SetEnum(_channelFlagKey, _channelFlag);
 }
Exemplo n.º 4
0
 private void OnEnable()
 {
     _sourceType    = EditorPrefsExt.GetEnum(_sourceTypeKey, TextureSourceType.None);
     _materialId    = EditorPrefs.GetInt(_materialIdKey, 0);
     _propertyName  = EditorPrefs.GetString(_propertyNameKey, string.Empty);
     _filterMode    = Mathf.Clamp(EditorPrefs.GetInt(_filterModeKey, 1), 0, 1);
     _customTexture = EditorPrefsExt.GetAsset <Texture2D>(_customTextureKey);
     _repeating     = EditorPrefs.GetBool(_repeatingKey, false);
     _color         = EditorPrefsExt.GetColor(_colorKey, Color.white);
     _channelFlag   = EditorPrefsExt.GetEnum(_channelFlagKey, TextureChannelFlags.RGBA);
 }
Exemplo n.º 5
0
 private void OnDisable()
 {
     EditorPrefs.SetBool(_drawGridKey, _drawGrid);
     EditorPrefs.SetInt(_lineThicknessKey, _lineThickness);
     EditorPrefsExt.SetColor(_lineColorKey, _lineColor);
     EditorPrefs.SetBool(_drawOutlineKey, _drawOutline);
     EditorPrefsExt.SetColor(_outlineColorKey, _outlineColor);
     EditorPrefs.SetBool(_drawVertexKey, _drawVertex);
     EditorPrefs.SetInt(_vertexSizeKey, _vertexSize);
     EditorPrefs.SetBool(_drawVertexOutlineKey, _drawVertexOutline);
     EditorPrefsExt.SetColor(_vertexOutlineColorKey, _vertexOutlineColor);
 }
Exemplo n.º 6
0
 private void OnEnable()
 {
     _drawGrid           = EditorPrefs.GetBool(_drawGridKey, true);
     _lineThickness      = Mathf.Clamp(EditorPrefs.GetInt(_lineThicknessKey, 1), 1, 5);
     _lineColor          = EditorPrefsExt.GetColor(_lineColorKey, Color.white);
     _drawOutline        = EditorPrefs.GetBool(_drawOutlineKey, true);
     _outlineColor       = EditorPrefsExt.GetColor(_outlineColorKey, new Color(0.0f, 0.0f, 0.0f, 0.5f));
     _drawVertex         = EditorPrefs.GetBool(_drawVertexKey, true);
     _vertexSize         = Mathf.Clamp(EditorPrefs.GetInt(_vertexSizeKey, 5), 1, 9);
     _drawVertexOutline  = EditorPrefs.GetBool(_drawVertexOutlineKey, true);
     _vertexOutlineColor = EditorPrefsExt.GetColor(_vertexOutlineColorKey, new Color(0.0f, 0.0f, 0.0f, 0.5f));
 }