# Is there a way to get a MediaPlayer from a texture of an Actor?

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-get-a-mediaplayer-from-a-texture-of-an-actor/432818>\
**Category:** Asset Creation\
**Tags:** raycasting, unreal-engine, Scripting, question\
**Created:** [August 30, 2018, 6:24pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-a-mediaplayer-from-a-texture-of-an-actor/432818 "2018-08-30T18:24:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![4nof](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@4nof](https://forums.unrealengine.com/u/4nof)\
**Post date:** [August 30, 2018, 6:24pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-get-a-mediaplayer-from-a-texture-of-an-actor/432818/1 "2018-08-30T18:24:08Z")

</div>

I don’t care whether this is done in C++ or Blueprints, but I have an Actor playing a video that I have selected using a Raycast line

> **[Using a Single Line Trace (Raycast) by Object](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Tracing/HowTo/SingleLineTraceByObject/)**
>
> This how-to guide covers using a Single Line Trace by Object Blueprint node to return the first World Dynamic Actor it hits, and prints its name.

I want to find the MediaPlayer associated with that plane.

1. can I have an event “On Ray Hit” or “on collision” on the plane that sets a gameInstance variable to the MediaPlayer - manually set the media player associated with the plane?
2. Is there a way to traverse the Actor object until I get to the MediaPlayer being used? perhaps through the Media texture?
