Ejemplo n.º 1
0
        public static void RequestRuleWindow(SerializedProperty rule, bool inSet)
        {
            RuleWindow2 window = CreateWindow <RuleWindow2>();

            window.minSize     = WindowUtils.RuleMinWindowSize;
            window.SubjectRule = rule;
            window.isInSet     = inSet;
            window.Initialize(inSet);
        }
Ejemplo n.º 2
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(position, label, property);
            string ruleName = property.FindPropertyRelative("RuleName").stringValue;

            if (GUI.Button(position, new GUIContent(string.Format("Open Rule ({0})", ruleName), "Open this rule in RuleSystem Editor")))
            {
                RuleWindow2.RequestRuleWindow(property, false);
            }

            EditorGUI.EndProperty();
        }