예제 #1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        NavGrid ng = (NavGrid)target;

        GUILayout.BeginVertical();
        if (GUILayout.Button("Make Symmetrical"))
        {
            ng.MakeSymmetrical();
        }
        if (GUILayout.Button("Link Neighbours"))
        {
            ng.FindNeighboursViaRaycast();
            ng.MakeSymmetrical();
        }
        if (GUILayout.Button("Clear Neighbour List"))
        {
            ng.ClearNeighbours();
        }
        GUILayout.EndVertical();
    }