I am new to UE, please help me understand how can I make this work: i want to play wideo in widget which is relevant to certain actor. I have 9 actors with different static meshes, but actors are same class and each of them is supposed to have their own animation showing in widget.
Here is my logic for highliting and selecting actors:
Implement in your parent actor GetEmbeddedMedia(), which will return default media link. And change default link to the appropriate link in each actor.
OnClick call GetEmpeddedMedia() on the selected actor, then call PlayMedia() on your widget with link from actor (expand this interface for this widget before).
So each of your 9 actors needs to have a way of telling the âTouchandPlayâ widget what video to play.
This would take the form of an exposed variable. (variable type would depend on what sort of info the widget wants to select the correct video)
Also, if youâre only using the UMG widget for just holding the video, please know that another approach would be to just select what âvideo texture/materialâ to play on a static mesh. (No UMG approach)
If your project is small (<5GB?) consider uploading it for us to poke at. (File â âZip Projectâ)
Thanks, i will upload the test project But I think i also can make 9 different widgets with 9 different animations in them (using Open source in widget event graph). Unfortunately i donât know how to assaign relevant widget to child actor and access the widget on clicking the child actor. The parent actor is my Decal that highlights when in the line of the sight.
There are 2 animations, 2 media players- 2 media textures for testing.
Please show me on this example how to use GetEmbeddedMedia and PlayMedia or the exposed variable to access the media textures and players and open widget
Thanks for your help!
There is a new (as of 5.1 I think!) feature called âMedia Plateâ and working with video is exponentially easier.
It makes more sense to show the videos in the 3d environment instead of plastered to screen as UMG widget right?
Note: on the Media Plates placed in the level: I changed âActor Hidden in Gameâ to true. Also âPlay only when visibleâ to true. (It unhides the referenced media plate when the object is clicked on)
Good job with your project, as a âUE beginnerâ you are combining âintermediateâ systems with success.
Thank you very much for your involvement!
Unfortunately, I need to make this animations in widget, so that they are full screenâŚ
I decided to make separte widgets for each child actor and it works fine as I click them and it opens relevant widget. But⌠there is a snag. I made the system of highlighting object in line of my sight and when i add to this clicking by cursor it seems unintuitive.
I share my test project to dowload.
Please help me to somehow connect the fun of realitime highlighting with action of clicking. Maybe I should make new Bp interface named Clicking Actors, make an event from it in child actor (insted of OnClickedevent) and call this in my bp First Person Character after checking if selected actor is valid? The point is to highlight actor with it selected click anywhere in space (no cursor visible) to access the event inside child actor (the event that creates widget).
Thanks for your help and support. Its nice to code with nodes as i am 3d artist and they are in use in all 3d software