UMG does not change visibility at first click
Hi, I building the UMG system of an app, and I found a problem, maybe a bug. I give you a description to replicate it.
First I have create a user pawn, at the event "beginplay" I set the "input mode to UI and Game", and "show the mouse" on. after from that I "create a widget" (UMG_Main) and place it on user screen.
I have build a widget: UMG_Main where I have some other user created widget that should become visible or collapsed. So I have created 2 new widgets to use there UMG_1 (visible) and UMG_2 (collapse) any case both of them do not overlap on the screen space. Finally I have create a 4th widget called UMG_button with a custom button to use in all the app. The button have a "event dispatcher" at "on clicked".
After that I have place that button at UMG_1 and UMG_2 and at UMG_Main I have created an "bind event" from "on clicked" dispatcher at UMG_button to activate a "custom event" that should collapse UMG_1 and make visible UMG_2
Now when I test it, when I press the button that should colapse the UMG_1 and make visible UMG_2 it only makes visible UMG_2. UMG_1 remain visible. If I click a second time, in that moment it finally colapse.
I have tried using hide instead of colapse, or the widget switcher but the result is the same.
I have also check about the visibility. after ask to colapse, I add a "is visible" and in case of false print a string. so after I press the first time even it do not collapse it print the string as it is not visible.
I guess more than a bug it is more a problem in my logic, so thanks for any idea about how to do this.
asked Aug 25 '17 at 03:23 AM in Blueprint Scripting
Hi, I have try with half opacity in the custom widgets UMG_1 and UMG_2,
Of course that does not change the problem but it makes evident what can be the problem.
once I click first time it seem the widget becomes more transparent, so seems that the problem is there widgets are duplicated, but not idea how that happens.
answered Aug 25 '17 at 04:20 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here