playMaker

Author Topic: Setproperty > Correct Usage ? [SOLVED]  (Read 4054 times)

white

  • Playmaker Newbie
  • *
  • Posts: 5
Setproperty > Correct Usage ? [SOLVED]
« on: November 30, 2011, 02:35:46 PM »
What is the correct usage of "setproperty" ? Seems like I am unable to access most of the properties of the dropped objects. I've tried it with 3D Text (to change the "text") and particles (to switch off the emit) but seems like they are just not there.

Thank you.
« Last Edit: December 11, 2011, 12:10:27 AM by alexchouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Setproperty > Correct Usage ?
« Reply #1 on: November 30, 2011, 03:52:09 PM »
You have to drag the Text Mesh component from the Unity inspector onto the Target Object field. You'll then see all the public properties in that component.

Object in this context refers to a UnityEngine.Object, not a GameObject. This means you can manipulate anything derived from UnityEngine.Object. Create an Object variable, select it, then look at the Object Type popup to see the full list!

Does that help? I need to make a quick screencast to show this off. It adds a lot of power to Playmaker, but I think most people will try to reference a GameObject instead of Components etc.

white

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Setproperty > Correct Usage ?
« Reply #2 on: November 30, 2011, 08:44:02 PM »
Oh ! This helped !
How about the usage with prefabs / spawned objects ?

Thank you !

Andrew.Lukasik

  • Full Member
  • ***
  • Posts: 134
    • my twitter @andrewlukasik
Re: Setproperty > Correct Usage ?
« Reply #3 on: December 03, 2011, 06:38:13 PM »
Quote from: white
How about the usage with prefabs / spawned objects ?

I've the same problem. I proposed possible solution/fix here: http://hutonggames.com/playmakerforum/index.php?topic=887.0

*Using <Has Component> on spawned object and then storing positive result as Object (for later use with <Set Property>)
« Last Edit: December 03, 2011, 06:40:32 PM by Andrew_Raphael_Lukasik »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Setproperty > Correct Usage ?
« Reply #4 on: December 09, 2011, 07:25:24 PM »
I posted a Get Component action here:
http://hutonggames.com/playmakerforum/index.php?topic=910.0

You can use this to get components at runtime.

Let me know how that works for you.