void UpdateNewTogglePropertyInfo(SP toggle) { var id = toggle.FindPropertyRelative("id"); var title = toggle.FindPropertyRelative("title"); var onDescription = toggle.FindPropertyRelative("onDescription"); var offDescription = toggle.FindPropertyRelative("offDescription"); var interactable = toggle.FindPropertyRelative("interactable"); id.stringValue = "TG" + (Math.Abs(toggle.GetHashCode())).ToString(); title.stringValue = String.Empty; onDescription.stringValue = String.Empty; offDescription.stringValue = String.Empty; interactable.boolValue = true; }
void UpdateNewButtonPropertyInfo(SP button) { var id = button.FindPropertyRelative("id"); var title = button.FindPropertyRelative("title"); var interactable = button.FindPropertyRelative("interactable"); var titleColor = button.FindPropertyRelative("titleColor"); var backgroundColor = button.FindPropertyRelative("backgroundColor"); var uninteractableTitleColor = button.FindPropertyRelative("uninteractableTitleColor"); var uninteractableBackgroundColor = button.FindPropertyRelative("uninteractableBackgroundColor"); id.stringValue = "BT" + (Math.Abs(button.GetHashCode())).ToString(); title.stringValue = String.Empty; interactable.boolValue = true; titleColor.colorValue = Color.white; backgroundColor.colorValue = Color.gray; uninteractableTitleColor.colorValue = Color.white; uninteractableBackgroundColor.colorValue = new Color(.25f, .25f, .25f, 1.0f); }