So I got to making a UI that controls the cameras but the UI is not responsive. I created on click events and programmed the buttons to set the view to a particular camera but the button is not interactable for some reason. The print script does not even return, meaning the button isn’t even registering being clicked. Am I missing something here?
Make sure your input mode is set to Game and UI. (or make it UI only if you wish when you open the menu)
If this doesn’t work - try to additionally set the widget with the button on focus. (you’ll have to set “Is Focusable” to true in the widget’s Class Defaults.
The Game and UI node worked. For some reason I deleted the input node from my player character at some previous point?
Thank you for the help.
And just another question if you don’t mind me asking: if I want to reference a camera actor from the blueprint, how do I call the specific camera from the scene? I tried creating a camera actor variable but I can’t just add the actor to it because it can’t be edited. I just want to reference the cameras from the widget blueprint but I can’t do that the same way I can in the level blueprint
Well it depends.
- If an instance of your caller blueprint is already placed in the level you can select it in the viewport/hierarchy and assign its public variables directly.
- If the instance is spawning later, (they are not placed in the level) you will need to somehow get the camera. One way is to get all actors of [camera actor] class and pick the camera from the resulting array, the other is to get an actor(s) with specific tag, etc. Here you have to figure out which cameras to pick and based on what to order them, etc.
- The third way is a mix between the two: having a manager. (I personally hate managers with a passion but they are useful when you are lazy, which for me, is always) You again get all actors of class or get actor with tag as in 2. but this time instead of multiple cameras you get The Manager. You’ve already placed the manager in the level and you’ve set and ordered all the cameras. It might even has some logic to switch them back and forth or give you a different camera each time you request, etc.
The cameras are always going to be in the level and the intent is to be able to select them using buttons in the widget blueprint. Does that mean I should add a camera to my widget blueprint and use that? Sorry for asking all these questions - I’m still kinda new to this and I have been racking my brain over this for weeks now.
EDIT: I’m going to change my method of interacting with the cameras and use physical actors in the game world to do it. That seems like a much easier, faster method, and a more visually appealing one. I’m going to give this a try.
Wait. I’m getting a deja vu.
Didn’t this help you back then?
I’m “the same guy” so we might as well continue there…
I forgot that I even made that thread… I’ll head back over to that one

