15 [CanEditMultipleObjects]
16 [CustomEditor(typeof(InteractionSlider), editorForChildClasses:
true)]
34 "defaultVerticalValue",
35 "_verticalValueRange",
36 "verticalSlideLimits",
38 "_verticalSlideEvent");
43 "defaultHorizontalValue",
44 "_horizontalValueRange",
45 "horizontalSlideLimits",
47 "_horizontalSlideEvent");
51 bool noRectTransformParent = !(
target.transform.parent !=
null &&
target.transform.parent.GetComponent<RectTransform>() !=
null && !(
target as
InteractionSlider).overrideRectLimits);
52 if (!noRectTransformParent) {
53 EditorGUILayout.HelpBox(
"This slider's limits are being controlled by the rect transform in its parent.", MessageType.Info);
56 if (!Application.isPlaying) {
60 base.OnInspectorGUI();
67 private void decorateHorizontalSlideLimits(SerializedProperty property) {
68 EditorGUI.BeginDisabledGroup(
target.transform.parent !=
null &&
target.transform.parent.GetComponent<RectTransform>() !=
null && !(
target as
InteractionSlider).overrideRectLimits);
71 private void decorateVerticalSlideLimits(SerializedProperty property) {
72 EditorGUI.EndDisabledGroup();
73 EditorGUI.BeginDisabledGroup(
target.transform.parent !=
null &&
target.transform.parent.GetComponent<RectTransform>() !=
null && !(
target as InteractionSlider).overrideRectLimits);
76 private void decorateHorizontalSteps(SerializedProperty property) {
77 EditorGUI.EndDisabledGroup();
void specifyConditionalDrawing(string conditionalName, params string[] dependantProperties)
Specify a list of properties that should only be displayed if the conditional property has a value of...
void specifyCustomDecorator(string propertyName, Action< SerializedProperty > decoratorDrawer)
Specify a callback to be used to draw a decorator for a specific named property. Should be called in ...
override bool RequiresConstantRepaint()
override void OnInspectorGUI()
A physics-enabled slider. Sliding is triggered by physically pushing the slider to its compressed pos...