Example #1
0
    // イメージを探す.
    public Botan.uiItemBase         findItem(string name)
    {
        Botan.uiItemBase item = null;

        do
        {
            GameObject go = this.find_child(this.uiCanvas, name);

            if (go == null)
            {
                Debug.LogError("[BotanRoot] Can't find \"" + name + "\".");
                break;
            }

            item = go.GetComponent <Botan.uiItemBase>();

            if (item == null)
            {
                Debug.LogError("[BotanRoot] Comonent \"Botan.uiItemBase\" not attached at \"" + name + "\".");
                break;
            }
        } while(false);

        return(item);
    }
Example #2
0
    // アイテムをパネルの子どもにする.
    public void             addItemToPanel(string panel_name, Botan.uiItemBase item)
    {
        Transform panel_transform = this.uiCanvas.transform.Find(panel_name);

        if (panel_transform != null)
        {
            item.setParent(panel_transform.gameObject);
        }
        else
        {
            item.setParent(this.uiCanvas);
        }
    }