예제 #1
0
    void AddApplyButton()
    {
        GUILayout.BeginHorizontal();

        GUILayout.Label("");    //为使按钮靠左,添加不显示的Label

        if (GUILayout.Button("Save", GUILayout.Width(50f), GUILayout.Height(20f)))
        {
            XML_IO.Save("maize.xml", Name, InitStep, MaxStep, LRule, BranchTexturePath, GlobalVariables, Meshes);
        }

        if (GUILayout.Button("Apply", GUILayout.Width(50f), GUILayout.Height(20f)))
        {
            XML_IO.Save("maize.xml", Name, InitStep, MaxStep, LRule, BranchTexturePath, GlobalVariables, Meshes);
            GameObject.Find("BuildButton").GetComponent <BuildButton>().Click();
        }

        GUILayout.EndHorizontal();
    }