Play testing error, doesn't work from map level?
Good day everyone!
Information: I have setup an OnActorClicked to create a grid with buttons and got it working! So when I press play it starts and when I click on the Actor it creates the widget... however when I test it in the map level "testMap" and press play there it won't work... If I start it from any other Blueprint or try Standalone game it works, seems like only when i press play when in the map level it won't work...
Question: Is this a bug or is it a setting I have missed somewhere?
asked Jan 09 '19 at 11:44 AM in Blueprint Scripting
Oh god no I feel so stupid now... I figured it out, somehow the Anchoring in the widget had reset so it was anchored in the top left corner so the widget ended up outside the screen! Thank you guys for your help anyway, I'll do way more testing in the future sorry! D:
answered Jan 11 '19 at 05:27 AM
Without actually having the blueprint in front of me to diagnose. I can only think of one thing. The Blueprint isn't being called. Ex. if the blueprint is on an actor, and the actor is placed in the world, but the Blueprint isn't referenced then the blueprint wont initialize. (won't run the blueprint) However, when you play in Standalone, it references all actors throughout the loaded level, as long as they are in the level somewhere or manually referenced. When you are in the blueprint editor and push the play button, it specifically references the actor in question. You said that you have an event for the "OnClickedEvent" which is a good way to reference the actor, however the actor isn't initializing before you click the button, so what I recommend you do is in the Construction Script, do something, anything, like maybe declare the value or a variable or something. Just make a blank text variable and in the Construction Script set the Text variable to equal "Hello" or something and then test it again and see if it helps. (Again this is just a theory and not a guarantee of whats going on)
answered Jan 11 '19 at 04:52 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here