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); }
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)); }