Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        targetObject.Update();

        EditorGUILayout.Vector3IntField("Pos", serializedPos.vector3IntValue);
        serializedComputerShader.objectReferenceValue = EditorGUILayout.ObjectField("Shader", serializedComputerShader.objectReferenceValue, typeof(ComputeShader));
        EditorGUILayout.ObjectField("Shader", serializedManager.objectReferenceValue, typeof(groundManager));

        layerMode    = EditorGUILayout.Toggle("Node Mode", layerMode);
        neighborMode = EditorGUILayout.Toggle("show neighbor Nodes", neighborMode);
        plane        = EditorGUILayout.Popup("Display Mode", plane, planes);

        EditorGUILayout.LabelField("Chunk Texture");
        textureDirection = EditorGUILayout.Popup("Direction", textureDirection, textureDirections);
        chunkTextues(serializedGroundTextures[textureDirection]);
        //textureDirections;


        if (c.n != null)
        {
            EditorGUILayout.LabelField("Nodes");
            drawNode();
        }
        targetObject.ApplyModifiedProperties();


        if (GUILayout.Button("UpdateMesh"))
        {
            c.updateMesh();
        }
    }