playMaker

Author Topic: Get Property, Set Property, Send Message etc.  (Read 8207 times)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3202
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Get Property, Set Property, Send Message etc.
« 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!


BrandonLunney

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #1 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.

Lars Steenhoff

  • Playmaker Newbie
  • *
  • Posts: 36
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #2 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?

JieAlan

  • Playmaker Newbie
  • *
  • Posts: 23
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #3 on: November 26, 2012, 06:44:01 PM »
I love this,but can you make a doc for this ,I can't see youtube

Red

  • Hero Member
  • *****
  • Posts: 563
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #4 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.)

Hushonik

  • Playmaker Newbie
  • *
  • Posts: 32
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #5 on: March 01, 2013, 10:26:07 PM »
waiting for a good tutorial for this.

Hush

mikejkelley

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #6 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.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #7 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

yodaka

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #8 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?


yodaka

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #9 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #10 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

MZK

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #11 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


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: Get Property, Set Property, Send Message etc.
« Reply #12 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.

Schiffer4

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
set RectTransform position value
« Reply #13 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Get Property, Set Property, Send Message etc.
« Reply #14 on: January 12, 2015, 06:08:31 AM »
Hi,

 I have covered the whole api for rectTransform, you can find them on the ecosystem.

 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