// setting value to owner public void SetValueToOwner() { if (IsValueColor32) { CurrentOwner.SetUserValue((Color32)EditedColor); } else { CurrentOwner.SetUserValue(EditedColor); } }
private void SetValueFromDropdown() { try { CurrentOwner.SetUserValue(ValueAtIdx(enumDropdown.value).ActualValue); } catch (Exception ex) { ExplorerCore.LogWarning("Exception setting from dropdown: " + ex); } }
private void OnApplyClicked() { try { for (int i = 0; i < CurrentInfo.Fields.Length; i++) { CurrentInfo.SetValue(RefInstance, inputFields[i].Text, i); } CurrentOwner.SetUserValue(RefInstance); } catch (Exception ex) { ExplorerCore.LogWarning("Exception setting value: " + ex); } }
private void SetValueFromFlags() { try { List <string> values = new List <string>(); for (int i = 0; i < CurrentValues.Count; i++) { if (flagToggles[i].isOn) { values.Add(ValueAtIdx(i).Name); } } CurrentOwner.SetUserValue(Enum.Parse(EnumType, string.Join(", ", values.ToArray()))); } catch (Exception ex) { ExplorerCore.LogWarning("Exception setting from flag toggles: " + ex); } }
private void OnApplyClicked() { CurrentOwner.SetUserValue(EditedValue); }