コード例 #1
0
 void OnEnable()
 {
     script      = (EventSO)target;
     listeners   = serializedObject.FindProperty("listeners");
     description = serializedObject.FindProperty("eventDescription");
     Value       = serializedObject.FindProperty("Value");
 }
コード例 #2
0
        protected override void OnBuildGui(ref Rect _position, SerializedProperty property, GUIContent label)
        {
            SetPosition(_position);
            EventSO variableSORef = (EventSO)SORef;

            if (variableSORef && SO.Zisettings.Inistance.ShowEventDiscription)//hase value
            {
                Rect prefixPos = EditorGUI.PrefixLabel(position, new GUIContent(" "));
                AddProberty(property);

                prefixPos.y = position.y;
                helpHeight  = AddHelp(variableSORef.eventDescription, MessageType.Info);
            }
            else
            {
                base.OnBuildGui(ref position, property, label);
            }
        }