Пример #1
0
        public override void NodeGUI()
        {
            height = 180f;
            GUILayout.Label("Reward giver ID:");
            rewardGiverID = GUILayout.TextField(rewardGiverID, GUILayout.Width(200f));
            if (WorldCreatorCursor.instance != null)
            {
                if (GUILayout.Button("Select", GUILayout.ExpandWidth(false)))
                {
                    WorldCreatorCursor.selectEntity += SetEntityID;
                    WorldCreatorCursor.instance.EntitySelection();
                }
            }
            GUILayout.Label("Reward text:");
            rewardText = GUILayout.TextArea(rewardText, GUILayout.ExpandHeight(false), GUILayout.Width(200f));
            height    += GUI.skin.textArea.CalcHeight(new GUIContent(rewardText), 200f);
            GUILayout.Label("Text Color:");
            float r, g, b;

            GUILayout.BeginHorizontal();
            r = RTEditorGUI.FloatField(textColor.r);
            g = RTEditorGUI.FloatField(textColor.g);
            b = RTEditorGUI.FloatField(textColor.b);
            GUILayout.EndHorizontal();
            textColor = new Color(r, g, b);
        }
Пример #2
0
    public override void NodeGUI()
    {
        base.NodeGUI();

        GUILayout.BeginHorizontal();
        GUILayout.BeginVertical();
        GUILayout.Label("octaves:");
        GUILayout.Label("frequency:");
        GUILayout.Label("amplitude:");
        GUILayout.EndVertical();
        GUILayout.BeginVertical();
        octaves   = RTEditorGUI.IntField(octaves);
        frequency = RTEditorGUI.FloatField(frequency);
        amplitude = RTEditorGUI.FloatField(amplitude);
        GUILayout.EndVertical();
        GUILayout.EndHorizontal();


        noiseFunction = noiseGUI.Display();

        if (GUI.changed || noiseGUI.changed)
        {
            fractalNoise = new FractalNoise(noiseFunction, octaves, frequency, amplitude);
            noiseDesc    = noiseGUI.noiseDesc();
            NodeEditor.curNodeCanvas.OnNodeChange(this);
        }
    }
Пример #3
0
        public override void NodeGUI()
        {
            GUILayout.Space(5);
            GUILayout.BeginVertical("Box");
            waitUntilFinished = RTEditorGUI.Toggle(waitUntilFinished, new GUIContent("Wait While Playing"));
            character         = RTEditorGUI.TextField(new GUIContent("Character", "The character to be moved. Should have an EntityController in-scene. " + DialogStartNode.extenalDependencyTooltip), character);
            destination       = RTEditorGUI.TextField(new GUIContent("Destination Object", "The object to move to." + DialogStartNode.extenalDependencyTooltip), destination);
            speed             = RTEditorGUI.FloatField("Speed", speed);
            GUILayout.BeginHorizontal();
            GUILayout.Label(new GUIContent("X Leniency"));
            xLeniency.min = RTEditorGUI.FloatField(xLeniency.min, GUILayout.Width(58));
            GUILayout.Space(2);
            xLeniency.max = RTEditorGUI.FloatField(xLeniency.max, GUILayout.Width(58));
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal();
            GUILayout.Label(new GUIContent("Y Leniency"));
            yLeniency.min = RTEditorGUI.FloatField(yLeniency.min, GUILayout.Width(58));
            GUILayout.Space(2);
            yLeniency.max = RTEditorGUI.FloatField(yLeniency.max, GUILayout.Width(58));
            GUILayout.EndHorizontal();
            endFacing = (Direction)RTEditorGUI.EnumPopup("End Facing", endFacing);
            GUILayout.EndVertical();

            //Don't know why this code needs to be here exactly, but it makes everything nicer? maybe add to some static stuff?
            GUILayout.BeginHorizontal();
            RTEditorGUI.labelWidth = 50;
            GUILayout.EndHorizontal();
        }
Пример #4
0
    public override void NodeGUI()
    {
        base.NodeGUI();
        GUILayout.BeginHorizontal();
        GUILayout.BeginVertical();

        // First input
        if (thresholdConnection.connected())
        {
            GUILayout.Label(thresholdConnection.name);
        }
        else
        {
            threshold = RTEditorGUI.FloatField(GUIContent.none, threshold);
        }
        thresholdConnection.SetPosition();

        GUILayout.EndVertical();
        GUILayout.EndHorizontal();

        if (GUI.changed)
        {
            NodeEditor.curNodeCanvas.OnNodeChange(this);
        }
    }
Пример #5
0
    public override void NodeGUI()
    {
        GUILayout.BeginHorizontal();

        GUILayout.BeginVertical();
        controlSignalKnob.DisplayLayout();
        useRange = RTEditorGUI.Toggle(useRange, "Use range");
        if (useRange)
        {
            min = RTEditorGUI.FloatField("Min", min);
            max = RTEditorGUI.FloatField("Max", max);
            FloatKnobOrSlider(ref sensitivity, min, max, sensitivityKnob);
        }
        else
        {
            sensitivityKnob.DisplayLayout();
        }
        GUILayout.EndVertical();

        GUILayout.FlexibleSpace();
        GUILayout.Label(string.Format("Value: {0:0.0000}", latchedValue));
        outputSignalKnob.DisplayLayout();
        GUILayout.EndHorizontal();

        if (GUI.changed)
        {
            NodeEditor.curNodeCanvas.OnNodeChange(this);
        }
    }
Пример #6
0
    public override void NodeGUI()
    {
        GUILayout.BeginHorizontal();
        GUILayout.BeginVertical();
        input.DisplayLayout();

        GUILayout.BeginHorizontal();
        GUILayout.Label(surfaceConnection.name);
        if (!surfaceConnection.connected())
        {
            surface = RTEditorGUI.FloatField(GUIContent.none, surface);
        }

        surfaceConnection.SetPosition();
        GUILayout.EndHorizontal();

        GUILayout.EndVertical();
        GUILayout.EndHorizontal();
        RTEditorGUI.EnumPopup(new GUIContent("Generation", "The type of Vertex generation"), mode, m =>
        {
            if (mode != m)
            {
                mode = m;
                NodeEditor.curNodeCanvas.OnNodeChange(this);
            }
        });

        if (GUI.changed)
        {
            NodeEditor.curNodeCanvas.OnNodeChange(this);
        }
    }
Пример #7
0
        protected override void NodeGUIProperties()
        {
            GUILayout.BeginVertical();

            Value = RTEditorGUI.FloatField(new GUIContent("Value", "Constant Value"), Value);

            GUILayout.EndVertical();
        }
Пример #8
0
        protected override void NodeGUIProperties()
        {
            GUILayout.BeginVertical();

            Frequency = RTEditorGUI.FloatField(new GUIContent("Frequency", "Frequency of the first octave"), Frequency);

            GUILayout.EndVertical();
        }
Пример #9
0
        public override void NodeGUI()
        {
            value = RTEditorGUI.FloatField(new GUIContent("Value", "The input value of type float"), value);
            outputKnob.SetPosition();

            if (GUI.changed)
            {
                NodeEditor.curNodeCanvas.OnNodeChange(this);
            }
        }
Пример #10
0
    protected internal override void NodeGUI()
    {
        value = RTEditorGUI.FloatField(new GUIContent("Value", "The input value of type float"), value);
        OutputKnob(0);

        if (GUI.changed)
        {
            NodeEditor.RecalculateFrom(this);
        }
    }
 protected override void NodeGUIProperties()
 {
     using (var horizontalScope = new GUILayout.HorizontalScope("box"))
     {
         GUILayout.FlexibleSpace();
         const float sz = 70.0f;
         _min = RTEditorGUI.FloatField("Min", _min, GUILayout.Width(sz));
         _max = RTEditorGUI.FloatField("Max", _max, GUILayout.Width(sz));
         GUILayout.FlexibleSpace();
     }
 }
        protected override void NodeGUIProperties()
        {
            GUILayout.BeginVertical();

            Displacement = RTEditorGUI.FloatField(new GUIContent("Displacement", "Displacement value of voronoi cells"), Frequency);
            Frequency    = RTEditorGUI.FloatField(new GUIContent("Frequency", "Frequency of the first octave"), Frequency);
            Seed         = RTEditorGUI.IntField(new GUIContent("Seed", "Random Seed"), Seed);
            UseDistance  = RTEditorGUI.Toggle(UseDistance, new GUIContent("UseDistance", "Apply Distance to Seed point to output value"));

            GUILayout.EndVertical();
        }
Пример #13
0
        protected override void NodeGUIProperties()
        {
            GUILayout.BeginVertical();

            Frequency = RTEditorGUI.FloatField(new GUIContent("Frequency", "Frequency of the first octave"), Frequency);
            Power     = RTEditorGUI.FloatField(new GUIContent("Power", "Set Power"), Power);
            Roughness = RTEditorGUI.IntField(new GUIContent("Roughness", "Set Roughness"), Roughness);
            Seed      = RTEditorGUI.IntField(new GUIContent("Seed", "Random Seed"), Seed);

            GUILayout.EndVertical();
        }
Пример #14
0
        public override void NodeGUI()
        {
            outputKnob.DisplayLayout();

            _frequency = RTEditorGUI.FloatField(new GUIContent("Frequency"), _frequency);

            if (GUI.changed)
            {
                NodeEditor.curNodeCanvas.OnNodeChange(this);
            }
        }
Пример #15
0
        public override void NodeGUI()
        {
            outputKnob.DisplayLayout();

            _value = RTEditorGUI.FloatField(new GUIContent("Constant value"), _value);

            if (GUI.changed)
            {
                NodeEditor.curNodeCanvas.OnNodeChange(this);
            }
        }
Пример #16
0
        public override void NodeGUI()
        {
            GUILayout.Space(5);
            GUILayout.BeginVertical("Box");
            waitTime = RTEditorGUI.FloatField("Seconds", waitTime);
            GUILayout.EndVertical();

            //Don't know why this code needs to be here exactly, but it makes everything nicer? maybe add to some static stuff?
            GUILayout.BeginHorizontal();
            RTEditorGUI.labelWidth = 50;
            GUILayout.EndHorizontal();
        }
Пример #17
0
        public override void NodeGUI()
        {
            GUILayout.Label("Text:");
            text = GUILayout.TextArea(text, GUILayout.ExpandHeight(false));
            if (!(useEntityColor = GUILayout.Toggle(useEntityColor, "Use entity color")))
            {
                GUILayout.Label("Text Color:");
                float r, g, b;
                GUILayout.BeginHorizontal();
                r = RTEditorGUI.FloatField(textColor.r);
                g = RTEditorGUI.FloatField(textColor.g);
                b = RTEditorGUI.FloatField(textColor.b);
                GUILayout.EndHorizontal();
                textColor = new Color(r, g, b);
            }


            GUILayout.Label("Answers:");
            for (int i = 0; i < answers.Count; i++)
            {
                RTEditorGUI.Seperator();
                GUILayout.BeginHorizontal();
                if (GUILayout.Button("x", GUILayout.ExpandWidth(false)))
                {
                    DeleteConnectionPort(outputPorts[i + 1]);
                    answers.RemoveAt(i);
                    i--;
                    if (i == -1)
                    {
                        break;
                    }
                    continue;
                }
                GUILayout.EndHorizontal();
                GUILayout.BeginHorizontal();
                answers[i] = RTEditorGUI.TextField(answers[i]);
                outputKnobs[i + 1].DisplayLayout();
                GUILayout.EndHorizontal();
            }
            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Add", GUILayout.ExpandWidth(false), GUILayout.MinWidth(100f)))
            {
                CreateConnectionKnob(outputAttribute);
                answers.Add("");
            }
            GUILayout.EndHorizontal();
            if (customDialogueSpeed = GUILayout.Toggle(customDialogueSpeed, "Use custom typing speed", GUILayout.MinWidth(40f)))
            {
                GUILayout.Label("Time between characters (seconds)");
                speed = double.Parse(GUILayout.TextField(speed + "", GUILayout.MinWidth(40f)));
            }
            cancel.DisplayLayout();
        }
        public override void NodeGUI()
        {
            GUILayout.Space(5);
            GUILayout.BeginVertical("Box");
            waitUntilFinished = RTEditorGUI.Toggle(waitUntilFinished, "Wait until finished");
            fadeTime          = RTEditorGUI.FloatField("Fade Time", fadeTime);
            GUILayout.EndVertical();

            //Don't know why this code needs to be here exactly, but it makes everything nicer? maybe add to some static stuff?
            GUILayout.BeginHorizontal();
            RTEditorGUI.labelWidth = 50;
            GUILayout.EndHorizontal();
        }
Пример #19
0
        public override void NodeGUI()
        {
            outputKnob.DisplayLayout();

            _frequency    = RTEditorGUI.FloatField(new GUIContent("Frequency"), _frequency);
            _displacement = RTEditorGUI.FloatField(new GUIContent("Lacunarity"), _displacement);
            _seed         = RTEditorGUI.IntField(new GUIContent("Seed"), _seed);
            _distance     = RTEditorGUI.Toggle(_distance, new GUIContent("Distance"));

            if (GUI.changed)
            {
                NodeEditor.curNodeCanvas.OnNodeChange(this);
            }
        }
Пример #20
0
        protected override void DrawConfigurationGUI()
        {
            base.DrawConfigurationGUI();
            _passType = (PassType)RTEditorGUI.EnumPopup("Pass type", _passType);

            if (_passType == PassType.High || _passType == PassType.Range)
            {
                _min = RTEditorGUI.FloatField("Min", _min);
            }

            if (_passType == PassType.Low || _passType == PassType.Range)
            {
                _max = RTEditorGUI.FloatField("Max", _max);
            }
        }
        public override void NodeGUI()
        {
            outputKnob.DisplayLayout();

            _frequency  = RTEditorGUI.FloatField(new GUIContent("Frequency"), _frequency);
            _lacunarity = RTEditorGUI.FloatField(new GUIContent("Lacunarity"), _lacunarity);
            _octaves    = RTEditorGUI.IntField(new GUIContent("Octaves"), _octaves);
            _seed       = SeedGUIUtils.SeedInput(_seedInputKnob, _seed);
            _quality    = (QualityMode)RTEditorGUI.EnumPopup(new GUIContent("Quality"), _quality);

            if (GUI.changed)
            {
                NodeEditor.curNodeCanvas.OnNodeChange(this);
            }
        }
Пример #22
0
        protected override void NodeGUIProperties()
        {
            GUILayout.BeginVertical();

            Frequency   = RTEditorGUI.FloatField(new GUIContent("Frequency", "Frequency of the first octave"), Frequency);
            Lacunarity  = RTEditorGUI.FloatField(new GUIContent("Lacunarity", "Set Lacunarity"), Lacunarity);
            OctaveCount = RTEditorGUI.IntField(new GUIContent("OctaveCount", "How many octaves to generate"), OctaveCount);
            Seed        = RTEditorGUI.IntField(new GUIContent("Seed", "Random Seed"), Seed);

#if UNITY_EDITOR
            Quality = (LibNoise.QualityMode)UnityEditor.EditorGUILayout.EnumPopup(new GUIContent("Quality", "Quality Mode for noise"), Quality);
#else
            GUILayout.Label(new GUIContent("Quality: " + Quality.ToString(), "Quality Mode for noise"));
#endif
            GUILayout.EndVertical();
        }
Пример #23
0
        public override void NodeGUI()
        {
            GUILayout.BeginHorizontal();
            input.DisplayLayout();
            output.DisplayLayout();
            GUILayout.EndHorizontal();

            GUILayout.Label("Color:");
            GUILayout.BeginHorizontal();
            var r = RTEditorGUI.FloatField(color.r);
            var g = RTEditorGUI.FloatField(color.g);
            var b = RTEditorGUI.FloatField(color.b);

            color = new Color(r, g, b);
            GUILayout.EndHorizontal();
        }
        protected void DrawPreview()
        {
            Material mtrl = new Material(Shader.Find("Transparent/Diffuse"));

            mtrl.SetColor("_Color", Color.white);
            mtrl.SetTexture("_MainTex", _previewTexture);

            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            Rect rect = GUILayoutUtility.GetRect(_previewWidth, _previewHeight, GUI.skin.box);

            if (_previewTexture != null)
            {
                //RTEditorGUI.DrawTexture(_previewTexture, _previewWidth, GUI.skin.box);
                //GUI.BeginGroup(rect);

                GUI.color = _textureSequenceId == _nextSequenceId ? Color.white : new Color(1.0f, 1.0f, 1.0f, 0.25f);
                GUI.DrawTexture(rect, _previewTexture, ScaleMode.ScaleToFit, true);
                GUI.color = Color.white;

                //UnityEditor.EditorGUI.DrawTextureAlpha(rect, _previewTexture);
                //UnityEditor.EditorGUI.DrawPreviewTexture(rect, _previewTexture);
                //Graphics.DrawTexture(rect, _previewTexture);
                //GUI.EndGroup();
            }

            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            using (var horizontalScope = new GUILayout.HorizontalScope("box"))
            {
                GUILayout.FlexibleSpace();
                const float sz = 70.0f;
                PreviewLeft   = RTEditorGUI.FloatField("Left", PreviewLeft, GUILayout.Width(sz));
                PreviewRight  = RTEditorGUI.FloatField("Right", PreviewRight, GUILayout.Width(sz));
                PreviewTop    = RTEditorGUI.FloatField("Top", PreviewTop, GUILayout.Width(sz));
                PreviewBottom = RTEditorGUI.FloatField("Bottom", PreviewBottom, GUILayout.Width(sz));
                GUILayout.FlexibleSpace();
            }
            PreviewSeamless = RTEditorGUI.Toggle(PreviewSeamless, "Seamless");

#if UNITY_EDITOR
            Colorization = (NodeModuleBase.ColorMode)UnityEditor.EditorGUILayout.EnumPopup(new GUIContent("ColorMode", "Colorization method for preview"), Colorization);
#else
            GUILayout.Label(new GUIContent("Colorization: " + Colorization.ToString(), "Quality Mode for noise"));
#endif
        }
Пример #25
0
    public INoise Display()
    {
        changed         = outOfBandChange;
        outOfBandChange = false;
        string[] names = noiseFunctions.Select(n => n.Name).ToArray();
        RTEditorGUI.Popup(new GUIContent("Noise", "The noise type to use"), noiseTypeIndex, names, selected =>
        {
            noiseTypeIndex       = selected;
            Type selectedNoise   = noiseFunctions[selected];
            selectedNoiseType    = selectedNoise.ToString();
            ConstructorInfo ctor = selectedNoise.GetConstructors()[0];

            noiseParameters = defaultParams(ctor);
            noiseFunction   = (Noise)ctor.Invoke(noiseParameters);

            outOfBandChange = true;
        });

        GUILayout.BeginVertical();
        ConstructorInfo ctor2 = noiseFunctions[noiseTypeIndex].GetConstructors()[0];

        ParameterInfo[] pInfo = ctor2.GetParameters();
        for (int i = 0; i < pInfo.Length; i++)
        {
            GUILayout.BeginHorizontal();
            GUILayout.Label(pInfo[i].Name);
            if (pInfo[i].ParameterType == typeof(int))
            {
                noiseParameters[i] = RTEditorGUI.IntField((int)noiseParameters[i]);
            }
            else if (pInfo[i].ParameterType == typeof(float))
            {
                noiseParameters[i] = RTEditorGUI.FloatField((float)noiseParameters[i]);
            }
            GUILayout.EndHorizontal();
        }
        GUILayout.EndVertical();

        if (GUI.changed)
        {
            noiseFunction = (Noise)ctor2.Invoke(noiseParameters);
            changed       = true;
        }

        return(noiseFunction);
    }
Пример #26
0
    public override void NodeGUI()
    {
        GUILayout.BeginHorizontal();
        GUILayout.BeginVertical();

        if (Inputs [0].connection != null)
        {
            GUILayout.Label(Inputs [0].name);
        }
        else
        {
            Input1Val = RTEditorGUI.FloatField(GUIContent.none, Input1Val);
        }
        InputKnob(0);
        // --
        if (Inputs [1].connection != null)
        {
            GUILayout.Label(Inputs [1].name);
        }
        else
        {
            Input2Val = RTEditorGUI.FloatField(GUIContent.none, Input2Val);
        }
        InputKnob(1);

        GUILayout.EndVertical();
        GUILayout.BeginVertical();

        Outputs [0].DisplayLayout();

        GUILayout.EndVertical();
        GUILayout.EndHorizontal();

#if UNITY_EDITOR
        type = (CalcType)UnityEditor.EditorGUILayout.EnumPopup(new GUIContent("Calculation Type", "The type of calculation performed on Input 1 and Input 2"), type);
#else
        GUILayout.Label(new GUIContent("Calculation Type: " + type.ToString(), "The type of calculation performed on Input 1 and Input 2"));
#endif

        if (GUI.changed)
        {
            NodeEditor.RecalculateFrom(this);
        }
    }
        protected void DrawPreview()
        {
            Material mtrl = new Material(Shader.Find("Transparent/Diffuse"));

            mtrl.SetColor("_Color", Color.white);
            mtrl.SetTexture("_MainTex", _previewTexture);

            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            Rect rect = GUILayoutUtility.GetRect(_previewWidth, _previewHeight, GUI.skin.box);

            if (_previewTexture != null)
            {
                //RTEditorGUI.DrawTexture(_previewTexture, _previewWidth, GUI.skin.box);
                //GUI.BeginGroup(rect);

                GUI.color = _textureSequenceId == _nextSequenceId ? Color.white : new Color(1.0f, 1.0f, 1.0f, 0.25f);
                GUI.DrawTexture(rect, _previewTexture, ScaleMode.ScaleToFit, true);
                GUI.color = Color.white;

                //UnityEditor.EditorGUI.DrawTextureAlpha(rect, _previewTexture);
                //UnityEditor.EditorGUI.DrawPreviewTexture(rect, _previewTexture);
                //Graphics.DrawTexture(rect, _previewTexture);
                //GUI.EndGroup();
            }

            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            Cutoff           = RTEditorGUI.FloatField("Cutoff", Cutoff);
            SmoothIterations = RTEditorGUI.IntField("Smooth Iterations", SmoothIterations);

            using (var horizontalScope = new GUILayout.HorizontalScope("box"))
            {
                GUILayout.FlexibleSpace();
                const float sz = 70.0f;
                PreviewLeft   = RTEditorGUI.FloatField("Left", PreviewLeft, GUILayout.Width(sz));
                PreviewRight  = RTEditorGUI.FloatField("Right", PreviewRight, GUILayout.Width(sz));
                PreviewTop    = RTEditorGUI.FloatField("Top", PreviewTop, GUILayout.Width(sz));
                PreviewBottom = RTEditorGUI.FloatField("Bottom", PreviewBottom, GUILayout.Width(sz));
                GUILayout.FlexibleSpace();
            }
            PreviewSeamless = RTEditorGUI.Toggle(PreviewSeamless, "Seamless");
        }
Пример #28
0
            protected internal override void NodeGUI()
            {
                GUILayout.Label("This is an delay Node");

                GUILayout.BeginHorizontal();
                GUILayout.BeginVertical();

                Inputs [0].DisplayLayout();

                GUILayout.EndVertical();
                GUILayout.BeginVertical();

                Outputs [0].DisplayLayout();

                GUILayout.EndVertical();
                GUILayout.EndHorizontal();

                Duration = RTEditorGUI.FloatField(new GUIContent("Delay", "delay in second before continue"), Duration);
            }
Пример #29
0
        public override void NodeGUI()
        {
            GUILayout.BeginHorizontal();
            GUILayout.BeginVertical();

            // First input
            if (input1Knob.connected())
            {
                GUILayout.Label(input1Knob.name);
            }
            else
            {
                Input1Val = RTEditorGUI.FloatField(GUIContent.none, Input1Val);
            }
            input1Knob.SetPosition();

            // Second input
            if (input2Knob.connected())
            {
                GUILayout.Label(input2Knob.name);
            }
            else
            {
                Input2Val = RTEditorGUI.FloatField(GUIContent.none, Input2Val);
            }
            input2Knob.SetPosition();

            GUILayout.EndVertical();
            GUILayout.BeginVertical();

            // Output
            outputKnob.DisplayLayout();

            GUILayout.EndVertical();
            GUILayout.EndHorizontal();

            type = (CalcType)RTEditorGUI.EnumPopup(new GUIContent("Calculation Type", "The type of calculation performed on Input 1 and Input 2"), type);

            if (GUI.changed)
            {
                NodeEditor.curNodeCanvas.OnNodeChange(this);
            }
        }
Пример #30
0
        public override void NodeGUI()
        {
            height = 150f;
            GUILayout.BeginHorizontal();
            input.DisplayLayout();
            output.DisplayLayout();
            GUILayout.EndHorizontal();
            GUILayout.Label("Text:");
            text    = GUILayout.TextArea(text);
            height += GUI.skin.textArea.CalcHeight(new GUIContent(text), 200f);

            GUILayout.Label("Color:");
            float r, g, b;

            GUILayout.BeginHorizontal();
            r = RTEditorGUI.FloatField(color.r);
            g = RTEditorGUI.FloatField(color.g);
            b = RTEditorGUI.FloatField(color.b);
            GUILayout.EndHorizontal();
            color = new Color(r, g, b);
        }