Exemple #1
0
        private void CustomizeLabel(Rect area, SerializedProperty property, int index)
        {
            var targ = this.serializedObject.targetObject as i_TriggerRandomElimination;

            if (!Application.isPlaying ||
                this.serializedObject.isEditingMultipleObjects ||
                targ == null)
            {
                TriggerPropertyDrawer.DrawDefaultListElementLabel(area, property, index);
            }
            else
            {
                if (targ.TargetHasBeenUsed(index))
                {
                    var r0 = new Rect(area.xMin, area.yMin, Mathf.Min(36f, area.width), EditorGUIUtility.singleLineHeight);
                    var r1 = new Rect(r0.xMax, area.yMin, Mathf.Max(0f, area.width - r0.width), EditorGUIUtility.singleLineHeight);
                    EditorGUI.LabelField(r0, index.ToString("X 00:"));
                    TriggerTargetPropertyDrawer.DrawTriggerActivationTypeDropdown(r1, property, false);
                }
                else
                {
                    TriggerPropertyDrawer.DrawDefaultListElementLabel(area, property, index);
                }
            }
        }
        protected override void OnEnable()
        {
            base.OnEnable();

            _drawer = new TriggerPropertyDrawer();
        }
Exemple #3
0
        protected override void OnEnable()
        {
            base.OnEnable();

            _drawer = new TriggerPropertyDrawer();
        }