noodle run Posted July 30, 2025 Share Posted July 30, 2025 var PButtons = (new PButton("DirectionButton" + i.ToString()) { ToolTip = "Select direction " + directions, Margin = new RectOffset(5, 15, 5, 15), Color = mColor, Sprite = arrowSprite_inact, } ); panel.AddChild(PButtons, new GridComponentSpec(rows[1], columns[1])); buttonObjects.Add(PButtons.Build()); This is the code for the new button. private void Refresh() { var img = buttonObjects.GetComponent<KButton>().fgImage.overrideSprite; img = arrowSprite_act; Debug.Log("act:" + buttonObjects.name + ", sprite :" + img.ToString()); } The above is the refresh code. But it cannot refresh the new image. PLZ HELP Link to comment https://forums.kleientertainment.com/forums/topic/167307-why-cant-peterhans-pbutton-be-redrawn/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now