Why is this button not rendering?
Hi! I'm having a problem. I have a set of blueprints that are meant to dynamically create a button for every connected player when the game is started.
I get the player array by using "Get all actors of class" on the server; Like so: (This is on my level blueprint, and works pretty much correctly)
This gives me the value it's supposed to (in the editor atleast). That's all fine and good. Now I want to create buttons with this array. So I create a button (with a textblock in it), bind it to a local variable and make a function:(This is in the widget blueprint where I want to render the buttons)
So I test it, and it works fine, it creates buttons! So, I need to loop this function with my array, no problem. But there is. At first, I don't get the same values as the blueprint on the first picture, which is ridiculous because I'm doing the same exact thing, and I get every client instance of the class aswell. It now renders buttons, but only one of the buttons is the one I actually want.
So I add a check for if it's coming from the server (I believe) with "Has Authority". If it's true, add a button. But the button won't render.
I'm sure the "Add Button" function is running because I tried adding a print to the end of it, and lo and behold, it prints! Even more ridiculous is if I add the button when it's false, all the wrong buttons get rendered. So, I thought, maybe it's something to do with when there's only one button, so I added a doOnce on false, just to see what would happen. It renders of course. Anyway, here's the blueprint:
I honestly have no idea of how to proceed. Any help to be had here?
I think it might be a sequence of events problem. In your first two examples, they are called from event begin play, in the last, they are called from the constructor. Trying running your last sequence from event begin play.
answered May 31 '15 at 09:40 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here