- Home /
buttons for video player in unity
hello every one i created play and pause buttons for video to play in unity but i need replay button i don't know how to create it so plz someone help me
@harisurya883 how did you created your play/pause buttons? I have a video that is working where I'm using a rendertexture. I've tried going through the Unity tutorial but I'm completely lost as to where to start. Other solutions I've found are really old where I would have to rebuild my video which I don't want to do. Did you use a UI button for this or did you use the Unity tutorial as your starting point?
Answer by KittenSnipes · Mar 19, 2018 at 06:05 AM
Can you not just set the video that is loaded back to the video time of 0? So all you need to do is get the video time so you can set it to 0.
Try this it should work:
void Replay(VideoPlayer videoPlayer) {
videoPlayer.frame = 0;
}