Ejemplo n.º 1
0
    private void OnSceneGUI()
    {
        MeshCombinerScript mc = target as MeshCombinerScript;

        if (Handles.Button(mc.transform.position + Vector3.up * 2, Quaternion.LookRotation(Vector3.up), 1, 1, Handles.CylinderHandleCap))
        {
            mc.CombineMeshes();
        }
    }
Ejemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        MeshCombinerScript myScript = (MeshCombinerScript)target;

        if (GUILayout.Button("BuildMyMesh"))
        {
            myScript.MyOwnAdvancedMeshCombinder();
        }

        if (GUILayout.Button("DestroyMesh"))
        {
            myScript.DestroyMesh();
        }
    }