playMaker

Author Topic: Adding Playmaker support to asset  (Read 833 times)

chris.nolet

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Adding Playmaker support to asset
« on: May 07, 2018, 04:32:23 PM »
Hi there,

I'm an asset developer, and I was recently asked if I would be adding Playmaker support to my asset. I haven't used Playmaker before, and I'm wondering how to go about it.

The asset is called Quick Outline (free): https://assetstore.unity.com/packages/tools/particles-effects/quick-outline-115488.

The main script is quite simple. There are three properties the user can set: OutlineMode, OutlineColor and OutlineWidth. The properties are backed by three private fields with the [SerializeField] attribute: outlineMode, outlineColor and outlineWidth.

Is it possible for a Playmaker user to set a property on a script, without the developer making code changes? If not, how do I go about 'tagging' these properties in code for Playmaker to be able to edit them?

Thanks!

Ateam

  • Full Member
  • ***
  • Posts: 114
    • View Profile
Re: Adding Playmaker support to asset
« Reply #1 on: May 07, 2018, 05:58:03 PM »

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 694
    • View Profile
Re: Adding Playmaker support to asset
« Reply #2 on: May 07, 2018, 08:53:08 PM »
Hi Chris,

If you would like, I can write the scripts to integrate it with playmaker. I will then release them under MIT, so you can include it with your package or change them as you would like.

(I wrote the playmaker actions for the video that was posted, as well as for textmesh pro, VRTK, etc).

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 694
    • View Profile
Re: Adding Playmaker support to asset
« Reply #3 on: May 07, 2018, 11:15:08 PM »
Hi,

Here are the playmaker actions working: https://imgur.com/gallery/rw7g72y

Ive attached the actions to this post in a zip. Tested and working

chris.nolet

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: Adding Playmaker support to asset
« Reply #4 on: May 08, 2018, 01:01:17 AM »
Wow, this is great! Thank you! I didn’t even have time to reply to your original message; that was so quick. Thanks for taking an interest, jumping in, and creating something so rapidly.

If you’re interested to host a version of this on your GitHub, I’ll link to it from the Asset Store description if you like. Otherwise, I’ll put it on my GitHub and do the same, (with your permission).

Quick question: Am I right in thinking that Set Property won’t work with Quick Outline, because I’m using C# properties with side-effects, rather than public fields in the outline script?

In any case, it looks like the interface here with the custom FSM scripts is a lot more elegant!

Thanks again :)

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 694
    • View Profile
Re: Adding Playmaker support to asset
« Reply #5 on: May 08, 2018, 01:27:18 AM »
Hi,

Sure I would be happy to put it on my github. This is me here: https://github.com/dumbgamedev

You can also consider adding them to the package itself. Just unzip the folder and put in your project. Then left click on the folder and choose "export package". Make sure nothing in the export package option is selected , except the folder and actions (playmaker custom actions for this).

Save that new asset package into your project and delete the the folder of actions. Update on the store.

Now anyone who has playmaker, can just open that asset to install the actions.

Also, in the future, you might want to give your script a namespace, since "outline.cs" is so common, it could cause conflicts  :D

You can access the variables of outline.cs via get/set in playmaker. However, this is generally frowned upon in playmaker because then you end up with a whole project of get/set, which is very hard to debug. As well, some platforms cannot read get/set. Lastly, I am not sure about the overall performance of that method. So, custom playmaker actions are always the way to go.

I am working on game for vive right now, so I will be sure to give your actions a go in my game :D

smiffy

  • Junior Playmaker
  • **
  • Posts: 54
    • View Profile
Re: Adding Playmaker support to asset
« Reply #6 on: October 30, 2018, 08:01:13 AM »
Hey guys, did you ever release the actions for this?

Thanks
Matt