ObjectField() public static method

public static ObjectField ( GUIContent label, GameObject value, object callingObj ) : Object
label GUIContent
value GameObject
callingObj object
return Object
Ejemplo n.º 1
0
    public override void NodeGUI()
    {
        value = (GameObject)GUIExt.ObjectField(value, this);
        OutputKnob(0);

        if (GUI.changed)
        {
            NodeEditor.RecalculateFrom(this);
        }
    }
Ejemplo n.º 2
0
    public override void NodeGUI()
    {
        GUILayout.BeginHorizontal();
        GUILayout.BeginVertical();

        if (Inputs [0].connection != null)
        {
            GUILayout.Label(Inputs [0].name);
        }
        else
        {
            Input1Val = (GameObject)GUIExt.ObjectField(Input1Val, this);
        }
        InputKnob(0);
        // --
        if (Inputs [1].connection != null)
        {
            GUILayout.Label(Inputs [1].name);
        }
        else
        {
            Input2Val = (GameObject)GUIExt.ObjectField(Input2Val, this);
        }
        InputKnob(1);

        objectMaterial = (Material)UnityEditor.EditorGUILayout.ObjectField(objectMaterial, typeof(Material));

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

        Outputs [0].DisplayLayout();

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

        type = (CalcType)UnityEditor.EditorGUILayout.EnumPopup(
            new GUIContent("CSG Operation", "The type of calculation performed on Input 1 and Input 2"), type);

        if (GUI.changed)
        {
            NodeEditor.RecalculateFrom(this);
        }
    }
Ejemplo n.º 3
0
    public override void NodeGUI()
    {
        GUILayout.BeginHorizontal();
        GUILayout.BeginVertical();

        parent = (GameObject)GUIExt.ObjectField(parent, this);
        InputKnob(0);

        location = UnityEditor.EditorGUILayout.Vector3Field("", location, GUILayout.Height(20));

        type = (PrimitiveType)UnityEditor.EditorGUILayout.EnumPopup("Primitive", type);

        Outputs [0].DisplayLayout();
        GUILayout.EndVertical();
        GUILayout.EndHorizontal();

        if (GUI.changed)
        {
            NodeEditor.RecalculateFrom(this);
        }
    }