public void ChangeButtonColor(Event e)
    {
        // GUI lookup example
        Button button = GuiLookup.FindComponent <Button>(gameObject, "button1");

        if (null != button)
        {
            button.Color = Color.green;
        }
    }
예제 #2
0
    private void SetLabelText(Point screenSize)
    {
        var label = GuiLookup.FindComponent <Label>(gameObject, "lblRuler");

        label.Text = string.Format("{0} px", screenSize.X);
    }