internal virtual void Reset(PluginImporterInspector inspector) { string platformData = inspector.importer.GetPlatformData(this.platformName, this.key); try { this.value = TypeDescriptor.GetConverter(this.type).ConvertFromString(platformData); } catch { this.value = this.defaultValue; if (!string.IsNullOrEmpty(platformData)) { Debug.LogWarning(string.Concat(new object[] { "Failed to parse value ('", platformData, "') for ", this.key, ", platform: ", this.platformName, ", type: ", this.type, ". Default value will be set '", this.defaultValue, "'" })); } } }
protected void ParseStringValue(PluginImporterInspector inspector, string valueString, bool muteWarnings = false) { try { this.value = TypeDescriptor.GetConverter(this.type).ConvertFromString(valueString); } catch { this.value = this.defaultValue; if (!muteWarnings && !string.IsNullOrEmpty(valueString)) { if (inspector.importer.GetCompatibleWithPlatform(this.platformName)) { Debug.LogWarning(string.Concat(new object[] { "Failed to parse value ('", valueString, "') for ", this.key, ", platform: ", this.platformName, ", type: ", this.type, ". Default value will be set '", this.defaultValue, "'" })); } } } }
public virtual void Apply(PluginImporterInspector inspector) { if (!this.propertiesRefreshed) return; foreach (DefaultPluginImporterExtension.Property property in this.properties) property.Apply(inspector); }
protected virtual void RefreshProperties(PluginImporterInspector inspector) { foreach (var p in properties) { p.Reset(inspector); } propertiesRefreshed = true; }
protected virtual void RefreshProperties(PluginImporterInspector inspector) { foreach (DefaultPluginImporterExtension.Property property in this.properties) { property.Reset(inspector); } this.propertiesRefreshed = true; }
public virtual void Apply(PluginImporterInspector inspector) { if (this.propertiesRefreshed) { foreach (Property property in this.properties) { property.Apply(inspector); } } }
protected virtual void RefreshProperties(PluginImporterInspector inspector) { DefaultPluginImporterExtension.Property[] array = this.properties; for (int i = 0; i < array.Length; i++) { DefaultPluginImporterExtension.Property property = array[i]; property.Reset(inspector); } this.propertiesRefreshed = true; }
public virtual void Apply(PluginImporterInspector inspector) { if (!this.propertiesRefreshed) { return; } foreach (DefaultPluginImporterExtension.Property property in this.properties) { property.Apply(inspector); } }
public virtual void OnPlatformSettingsGUI(PluginImporterInspector inspector) { if (!this.propertiesRefreshed) this.RefreshProperties(inspector); EditorGUI.BeginChangeCheck(); foreach (DefaultPluginImporterExtension.Property property in this.properties) property.OnGUI(inspector); if (!EditorGUI.EndChangeCheck()) return; this.hasModified = true; }
public virtual void Apply(PluginImporterInspector inspector) { if (!propertiesRefreshed) { return; } foreach (var p in properties) { p.Apply(inspector); } }
public virtual void Apply(PluginImporterInspector inspector) { if (this.propertiesRefreshed) { DefaultPluginImporterExtension.Property[] array = this.properties; for (int i = 0; i < array.Length; i++) { DefaultPluginImporterExtension.Property property = array[i]; property.Apply(inspector); } } }
internal override void OnGUI(PluginImporterInspector inspector) { bool flag = false; EditorGUILayout.BeginVertical(EditorStyles.inspectorDefaultMargins, new GUILayoutOption[0]); GUILayout.Label("Framework dependencies", EditorStyles.boldLabel, new GUILayoutOption[0]); EditorGUI.BeginChangeCheck(); foreach (KeyValuePair <string, bool> pair in this.m_isFrequentEnabled) { this.m_isFrequentEnabled[pair.Key] = GUILayout.Toggle(pair.Value, pair.Key, new GUILayoutOption[0]); } if (EditorGUI.EndChangeCheck()) { flag = true; } this.m_isDefaultVisible = EditorGUILayout.Foldout(this.m_isDefaultVisible, this.GetDefaultFrameworksLabel(), true); if (this.m_isDefaultVisible) { EditorGUI.indentLevel++; using (new EditorGUI.DisabledScope(true)) { foreach (string str in this.m_defaultFrameworks) { GUILayout.Toggle(true, str, new GUILayoutOption[0]); } } EditorGUI.indentLevel--; } this.m_isRareVisible = EditorGUILayout.Foldout(this.m_isRareVisible, this.GetRareFrameworksLabel(), true); if (this.m_isRareVisible) { EditorGUI.indentLevel++; EditorGUI.BeginChangeCheck(); foreach (KeyValuePair <string, bool> pair2 in this.m_isRareEnabled) { this.m_isRareEnabled[pair2.Key] = GUILayout.Toggle(pair2.Value, pair2.Key, new GUILayoutOption[0]); } if (EditorGUI.EndChangeCheck()) { flag = true; } EditorGUI.indentLevel--; } GUILayout.EndVertical(); this.UpdateValue(); GUI.changed = flag; }
public virtual void OnPlatformSettingsGUI(PluginImporterInspector inspector) { if (!propertiesRefreshed) { RefreshProperties(inspector); } EditorGUI.BeginChangeCheck(); foreach (var p in properties) { p.OnGUI(inspector); } if (EditorGUI.EndChangeCheck()) { hasModified = true; } }
public virtual void OnPlatformSettingsGUI(PluginImporterInspector inspector) { if (!this.propertiesRefreshed) { this.RefreshProperties(inspector); } EditorGUI.BeginChangeCheck(); foreach (DefaultPluginImporterExtension.Property property in this.properties) { property.OnGUI(inspector); } if (!EditorGUI.EndChangeCheck()) { return; } this.hasModified = true; }
public virtual void OnPlatformSettingsGUI(PluginImporterInspector inspector) { if (!this.propertiesRefreshed) { this.RefreshProperties(inspector); } EditorGUI.BeginChangeCheck(); DefaultPluginImporterExtension.Property[] array = this.properties; for (int i = 0; i < array.Length; i++) { DefaultPluginImporterExtension.Property property = array[i]; property.OnGUI(inspector); } if (EditorGUI.EndChangeCheck()) { this.hasModified = true; } }
internal virtual void Reset(PluginImporterInspector inspector) { string platformData = inspector.importer.GetPlatformData(this.platformName, this.key); try { this.value = TypeDescriptor.GetConverter(this.type).ConvertFromString(platformData); } catch { this.value = this.defaultValue; if (string.IsNullOrEmpty(platformData)) { return; } Debug.LogWarning((object)("Failed to parse value ('" + platformData + "') for " + this.key + ", platform: " + this.platformName + ", type: " + (object)this.type + ". Default value will be set '" + this.defaultValue + "'")); } }
internal virtual void OnGUI(PluginImporterInspector inspector) { if (type == typeof(bool)) { value = EditorGUILayout.Toggle(name, (bool)value); } else if (type.IsEnum) { value = EditorGUILayout.EnumPopup(name, (Enum)value); } else if (type == typeof(string)) { value = EditorGUILayout.TextField(name, (string)value); } else { throw new NotImplementedException("Don't know how to display value."); } }
internal virtual void OnGUI(PluginImporterInspector inspector) { if (this.type == typeof(bool)) { this.value = EditorGUILayout.Toggle(this.name, (bool)this.value, new GUILayoutOption[0]); } else if (this.type.IsEnum) { this.value = EditorGUILayout.EnumPopup(this.name, (Enum)this.value, new GUILayoutOption[0]); } else { if (this.type != typeof(string)) { throw new NotImplementedException("Don't know how to display value."); } this.value = EditorGUILayout.TextField(this.name, (string)this.value, new GUILayoutOption[0]); } }
protected void ParseStringValue(PluginImporterInspector inspector, string valueString, bool muteWarnings = false) { try { value = TypeDescriptor.GetConverter(type).ConvertFromString(valueString); } catch { value = defaultValue; if (!muteWarnings && !string.IsNullOrEmpty(valueString)) { // We mute warnings for properties that are on disabled platforms to avoid unnecessary spam for deprecated values, case 909247 if (inspector.importer.GetCompatibleWithPlatform(platformName)) { Debug.LogWarning("Failed to parse value ('" + valueString + "') for " + key + ", platform: " + platformName + ", type: " + type + ". Default value will be set '" + defaultValue + "'"); } } } }
internal override void OnGUI(PluginImporterInspector inspector) { if (!((PluginImporter)inspector.target).isNativePlugin) { this.selectedIndex = EditorGUILayout.Popup(base.name, this.selectedIndex, this.placeHolders, new GUILayoutOption[0]); if ((this.selectedIndex >= 0) && (this.selectedIndex < this.placeHolders.Length)) { string text = this.placeHolders[this.selectedIndex].text; if (text == "(none)") { this.selectedIndex = -1; text = ""; } base.value = text; } else { base.value = ""; } } }
internal override void Reset(PluginImporterInspector inspector) { base.Reset(inspector); string platformData = inspector.importer.GetPlatformData(base.platformName, base.key); this.ResetValues(); char[] separator = new char[] { ';' }; string[] strArray = platformData.Split(separator); foreach (string str2 in strArray) { if (this.m_isFrequentEnabled.ContainsKey(str2)) { this.m_isFrequentEnabled[str2] = true; } else if (this.m_isRareEnabled.ContainsKey(str2)) { this.m_isRareEnabled[str2] = true; } else if (str2 != "") { this.m_userFrameworks.Add(str2); } } }
public virtual void OnDisable(PluginImporterInspector inspector) { }
public virtual bool HasModified(PluginImporterInspector inspector) { return(this.hasModified); }
public virtual void OnEnable(PluginImporterInspector inspector) { this.RefreshProperties(inspector); }
internal override void Reset(PluginImporterInspector inspector) { base.Reset(inspector); this._placeHolders = null; this.ResolveIndex(); }
public virtual void ResetValues(PluginImporterInspector inspector) { this.hasModified = false; this.RefreshProperties(inspector); }
public virtual void Apply(PluginImporterInspector inspector) { if (!this.propertiesRefreshed) { return; } DefaultPluginImporterExtension.Property[] array = this.properties; for (int i = 0; i < array.Length; i++) { DefaultPluginImporterExtension.Property property = array[i]; property.Apply(inspector); } }
internal virtual void Reset(PluginImporterInspector inspector) { string valueString = inspector.importer.GetPlatformData(platformName, key); ParseStringValue(inspector, valueString); }
internal virtual void Apply(PluginImporterInspector inspector) { inspector.importer.SetPlatformData(this.platformName, this.key, this.value.ToString()); }
internal virtual void OnGUI(PluginImporterInspector inspector) { if (this.type == typeof (bool)) this.value = (object) EditorGUILayout.Toggle(this.name, (bool) this.value, new GUILayoutOption[0]); else if (this.type.IsEnum) { this.value = (object) EditorGUILayout.EnumPopup(this.name, (Enum) this.value, new GUILayoutOption[0]); } else { if (this.type != typeof (string)) throw new NotImplementedException("Don't know how to display value."); this.value = (object) EditorGUILayout.TextField(this.name, (string) this.value, new GUILayoutOption[0]); } }
public virtual bool HasModified(PluginImporterInspector inspector) { return this.hasModified; }
internal virtual void Reset(PluginImporterInspector inspector) { string platformData = inspector.importer.GetPlatformData(this.platformName, this.key); this.ParseStringValue(platformData); }
internal virtual void Apply(PluginImporterInspector inspector) { string valueString = type == typeof(bool) ? value.ToString().ToLower() : value.ToString(); inspector.importer.SetPlatformData(platformName, key, valueString); }
internal virtual void Reset(PluginImporterInspector inspector) { string platformData = inspector.importer.GetPlatformData(this.platformName, this.key); try { this.value = TypeDescriptor.GetConverter(this.type).ConvertFromString(platformData); } catch { this.value = this.defaultValue; if (string.IsNullOrEmpty(platformData)) return; Debug.LogWarning((object) ("Failed to parse value ('" + platformData + "') for " + this.key + ", platform: " + this.platformName + ", type: " + (object) this.type + ". Default value will be set '" + this.defaultValue + "'")); } }
protected virtual void RefreshProperties(PluginImporterInspector inspector) { foreach (DefaultPluginImporterExtension.Property property in this.properties) property.Reset(inspector); this.propertiesRefreshed = true; }