Playmaker Forum

Playmaker Feedback => Action Requests => Topic started by: Alex Chouls on April 20, 2012, 07:31:14 AM

Title: Get Property, Set Property, Send Message etc.
Post by: Alex Chouls on April 20, 2012, 07:31:14 AM
Remember PlayMaker gives you generic access to a lot of Unity functionality with Get Property, Set Property, Send Message, Invoke Method etc.

It's always worth checking these first to see if they do what you need.

Tutorial videos for these coming soon!

Title: Re: Get Property, Set Property, Send Message etc.
Post by: BrandonLunney on April 20, 2012, 03:21:51 PM
Excellent Alex.  I don't understand the actions entirely, but enough to make it do what I need.  It will be a glorious day when the tutorials arrive.
Title: Re: Get Property, Set Property, Send Message etc.
Post by: Lars Steenhoff on July 07, 2012, 06:15:21 PM
I need enable/disable GUIText property "Pixel Correct"  put it does not show up in the set property list, any idea how I can access this?
Title: Re: Get Property, Set Property, Send Message etc.
Post by: JieAlan on November 26, 2012, 06:44:01 PM
I love this,but can you make a doc for this ,I can't see youtube
Title: Re: Get Property, Set Property, Send Message etc.
Post by: Red on February 25, 2013, 11:37:27 AM
I would be more than curious to know what Invoke Method does too... to be honest, i hadn't seen it until now. not sure what it would do (but, that's probably becuase i don't know what a "method" really is in this context.)
Title: Re: Get Property, Set Property, Send Message etc.
Post by: Hushonik on March 01, 2013, 10:26:07 PM
waiting for a good tutorial for this.

Hush
Title: Re: Get Property, Set Property, Send Message etc.
Post by: mikejkelley on November 10, 2013, 11:51:42 AM
Quote
I need enable/disable GUIText property "Pixel Correct"  put it does not show up in the set property list, any idea how I can access this?

I have a similar problem with accessing Max Forward Speed in Character Motor (Script), it's just not there.

Quote
I love this,but can you make a doc for this ,I can't see youtube

Ditto.

Quote
i don't know what a "method" really is in this context.

Same here.

Title: Re: Get Property, Set Property, Send Message etc.
Post by: jeanfabre on November 10, 2013, 11:10:21 PM
Hi,

 This script is using some nested classes and set/get property only gives you access to the simple public variables unfortunatly.

For this you need a custom action that you can find here:

http://hutonggames.com/playmakerforum/index.php?topic=3556.msg16386#msg16386

bye,

 Jean
Title: Re: Get Property, Set Property, Send Message etc.
Post by: yodaka on February 14, 2014, 09:05:54 PM
Hello,

I have one request about get/set property. When the property is none, I want get error message!!
If property is none, the action should be error because setting to none is meaningless action. I think this behavior is very convenient to check errors. Could you consider my request?

(https://dl.dropboxusercontent.com/u/4065222/images/getproperty2.png)
Title: Re: Get Property, Set Property, Send Message etc.
Post by: yodaka on February 14, 2014, 09:57:24 PM
Hi,

The problem was solved. I insert following lines to get/set propery actions.
Code: [Select]
// ERROR Check!
if (targetProperty.PropertyName == "")
     Debug.LogError("GetProperty error!", this.Owner);

I attach my modified GetPropery action.
Title: Re: Get Property, Set Property, Send Message etc.
Post by: jeanfabre on February 17, 2014, 09:06:42 AM
Hi,

 Thanks for sharing, indeed this is always better to fire errors in these cases.

bye,

 Jean
Title: Re: Get Property, Set Property, Send Message etc.
Post by: MZK on January 04, 2015, 01:57:36 AM
Hi,

Can i request an option to set multiply Property's in one action?
Lets say i have a colider At the Object type field and i want to enabled (bool) it  and change the radius (int) at the same time (same action).

is it possible?

thanks!
MZK

Title: Re: Get Property, Set Property, Send Message etc.
Post by: Lane on January 04, 2015, 09:11:11 AM
Set property only targets one variable. You can use call method and pass multiple arguments but it doesn't sound like that's what you need.
Title: set RectTransform position value
Post by: Schiffer4 on January 12, 2015, 01:15:39 AM
Hi, i just updated the new Unity UI and encountered an annoying problem here.

I have been trying  to modify the RectTransform in order to create a flying in effect of menu but having difficulty on setting the position x through custom action, the x value is always larger than the value i set ...

The code below actually successfully modified the y and z value, just not working on the x value...

Code: [Select]
public FsmFloat rectTransFormPosX;

public bool everyFrame;

private RectTransform _rectTransform;

public override void Reset()
{
rectTransFormPosX = null;
everyFrame = false;
}

public override void OnEnter()
{

GameObject _go = Fsm.GetOwnerDefaultTarget(gameObject);
if (_go!=null)
{
_rectTransform = _go.GetComponent<RectTransform>();
}

DoSetRectTransformValue();

if (!everyFrame)
Finish();
}

void DoSetRectTransformValue()
{


if (_rectTransform!=null)
{
_rectTransform.localPosition = new Vector3(rectTransFormPosX.Value, 4f, 0f);
}
}


or anyone already done this? Tried searching on ecosystem but in vain
Title: Re: Get Property, Set Property, Send Message etc.
Post by: jeanfabre on January 12, 2015, 06:08:31 AM
Hi,

 I have covered the whole api for rectTransform, you can find them on the ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181).

 have you tried using them? I think you'll have everything you need there.

 now in your case, you could be facing a simple setup issue where your RectTransform is slaved on the x axis based on layout rules you define from itself or its parent or as a result of being confised in a areay smaller than the width and so it can't move sideways.

 Bye,

 Jean