Ejemplo n.º 1
0
    private void OnEnable()
    {
        gridData = GridDataReader.ReadData(gridConfigFile);
        nodeData = NodeDataReader.ReadData(nodeConfigFile);

        CreateGrid(gridData, nodeData);
    }
Ejemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        myTarget = ( Grid )target;
        DrawDefaultInspector();

        // Generate grid button
        if (GUILayout.Button("Generate Grid"))
        {
            GridConfigData gridData = GridDataReader.ReadData(myTarget.gridConfigFile);
            int [,] nodeData = NodeDataReader.ReadData(myTarget.nodeConfigFile);
            myTarget.CreateGrid(gridData, nodeData);
        }
    }