I’m having some trouble with getting my Character Customisation to update with UMG slider buttons ect. The character updates with no issues when the customisation function I have made runs through event tick, however on event begin play or a custom event I enable with a button it refuses to update the character.
I understand that the event tick is working because it’s continuously assigning the meshes or the ones I select every tick, however I can’t seem to update the character any other way.
Is there another function or event I can call in the character blueprint to read the customisation changes I make whenever the UMG inputs set the new meshes or colours?
Hey, it could be that your player controller hasn’t been instanced/created yet when Event BeginPlay is called? Add an “Is Valid?” node with your Get Player Controller as its input and a print failed connected to the failed output… to check if its failing because player controller isn’t valid yet. UE4 has a sequential boot sequence when instantiating your classes so some Event BeginPlays can run before other classes they reference have been created…
You can create a “PostInit” boolean initialised as false. Then from Event Tick branch on PostInit and on the false path do an IsValid on your player controller, if its valid set PostInit True. On the branch PostInit true path you can then do another check to see if there have been any changes to you meshes colours to run your customisation function… Or even better, most widget buttons have an On Activation function that you can set to be called when the button is pressed/changed, so you can simply call your customisation function from there.
Add a print node on your character customize event - run it. If it doesn’t print, the event hasn’t been called.
Add a print node to “cast failed” - if it prints, three’s an issue with player controller, as above poster mentioned.
Add a print not to your FALSE branch, if that prints then your conditional check is bugged.