Esempio n. 1
0
        public override void OnBodyGUI()
        {
            serializedObject.Update();
            {
                if (_valueOutPut == null)
                {
                    if (_valueNode.ValueType != null)
                    {
                        _valueOutPut = _valueNode.AddDynamicOutput(_valueNode.ValueType, fieldName: ValueNode.ValueOutPutPortName);
                    }
                }

                base.OnBodyGUI();

                if (_valueNode.IsChangeValueType)
                {
                    if (GUILayout.Button("Change Type"))
                    {
                        windowContent.BaseType = _valueNode.BaseType;

                        UnityEditor.PopupWindow.Show(new Rect(GetCurrentMousePosition(), new Vector2(0, 0)),
                                                     windowContent);
                    }
                }
            }
            serializedObject.ApplyModifiedProperties();
        }