Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: zombie_farm on October 02, 2013, 07:15:14 PM
-
I have a plugin called easy movie texture its using MediaPlayerCtrl.cs Im trying to Pause it by sending:
MediaPlayerCtrl.Instance.Pause() in the Method name..
I have 0% programing skills so ...what am I missing here?
(https://dl.dropboxusercontent.com/u/3080162/pauseExecute.png)
in the MediaPlayerCtrl I think this is what Im getting at:
public void Pause()
{
if(m_CurrentState == MEDIAPLAYER_STATE.PLAYING)
Call_Pause();
m_CurrentState = MEDIAPLAYER_STATE.PAUSED;
}
-
Hi,
Unfortunatly, what you are trying to call is not a Unity message so that action will not work.
Have you wrote this script? do you have scripting knowledge?
The key here will be to write either a custom action or modify the script to implement a proper message.
bye,
Jean
-
Ahh ok. I didn't write the script and don't have scripting knowledge. :(
So My friend who does know scripting..where would I tell him to look for a "proper message" ..could we send it to java first?
thanks
S
-
and.. this is how its being called from a GUI button
if( GUI.Button(new Rect(50,500,100,100),"pause"))
{
MediaPlayerCtrl.Instance.Pause();
}
can I replace GUI.Button with ....aaaa something PM will like?
-
Hi,
Yes, you should only have a custom action that deals with MediaPlayerCtrl.Instance.Pause();
and then you plug the rest normally using playmaker usual actions.
I have attached the custom action to do this. It's blind code as I don't have this MediaPlayerCtrl script but it should work.
Bye,
Jean
-
You ROCK!! thank you.
-
I had the same problem here and thought I found the solution when I found this post... But...
I tried importing the script but as soon as I throw it at unity the console gives me:
Assets/MediaPlayerCtrlPause.cs(14,41): error CS0117: `MediaPlayerCtrl' does not contain a definition for `Instance'
Using Unity 5.1. Any ideas?