コード例 #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        PorkChopPlot pcp = (PorkChopPlot)target;

        if (GUILayout.Button("Build Object"))
        {
            pcp.CreatePlot();
        }
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        base.Start();
        selector = GameObject.Find("selector");
        if (selector == null)
        {
            Debug.Log("cann't find selector in plot");
        }

        pcp = GetComponent <PorkChopPlot>();
        if (pcp == null)
        {
            Debug.Log("can't find porkchopplot component");
        }
    }