playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
Send Message to script [SOLVED]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Send Message to script [SOLVED] (Read 3452 times)
zombie_farm
Playmaker Newbie
Posts: 39
Send Message to script [SOLVED]
«
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?
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;
}
«
Last Edit: October 04, 2013, 06:48:13 PM by zombie_farm
»
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Send Message to script
«
Reply #1 on:
October 03, 2013, 02:03:33 AM »
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
Logged
zombie_farm
Playmaker Newbie
Posts: 39
Re: Send Message to script
«
Reply #2 on:
October 03, 2013, 01:46:12 PM »
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
Logged
zombie_farm
Playmaker Newbie
Posts: 39
Re: Send Message to script
«
Reply #3 on:
October 03, 2013, 02:00:41 PM »
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?
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Send Message to script
«
Reply #4 on:
October 04, 2013, 02:39:36 AM »
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
Logged
zombie_farm
Playmaker Newbie
Posts: 39
Re: Send Message to script (SOLVED)
«
Reply #5 on:
October 04, 2013, 06:47:08 PM »
You ROCK!! thank you.
Logged
jessicajrs
Playmaker Newbie
Posts: 1
Re: Send Message to script [SOLVED]
«
Reply #6 on:
November 15, 2015, 02:36:08 PM »
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?
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
Send Message to script [SOLVED]