schetty
1
Hi EveryOne,
Need to play my video in windows media player (or any other player) after click my unity 3d button in my screen?.
I took the standalone build from unity , in that data file i kept my vide file. I have a script in my button, that is below:
if(GUI.Button(new Rect(10, 10, 100, 30), "WMP"))
{
System.Diagnostics.Process.Start("wmplayer.exe", "C:\\user\\Desktop\\New folde\\videofile.mp4");
}
but the vide is not playing.
I need to play that video in windows media player as well as my unity scene.
Please help me to solve this issue.
Thanks.
Are you missing an r from the file path? Maybe you don’t have a folder called “New Folde”?
schetty
3
nothing like that…
when i just copy paste that was missed, thats all.
is there any way to play the video on unity as well as outside the unity?
try below line.
If u testing the application in unity editor , put the video file into asset folder.
If u testing the exe , put the video file into data folder.
System.Diagnostics.Process.Start(“wmplayer.exe”, Application.dataPath+“\your_video.mp4”);
schetty
5
i want to keep the video in out side the assets folder and i need to play that in unity and also windows media player
System.Diagnostics.Process.Start(“wmplayer.exe”, “C:/user/Desktop/New folder/videofile.mp4”);
shall i know what error u getting
schetty
9
error is not coming working fine in both commands, but video is not playing.
i kep my vide file in my desktop when i press the button it should play but its not.
you just try it yourself if you are free.
Yeah the video was not played which is in desktop.so copy the video file from desktop to other drive.It works for me.
schetty :twisted: parandham03