playMaker

Author Topic: How to add others custom actions  (Read 9467 times)

mohvisuals

  • Playmaker Newbie
  • *
  • Posts: 14
How to add others custom actions
« on: April 27, 2012, 03:39:28 PM »
How do you add custom actions from this forum?

 Ive copied the code and pasted it into the file from the action wizard, but it has a compile parsing error.

Is this how you would normally do it?

elvis75k

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 97
    • nRender
Re: How to add others custom actions
« Reply #1 on: April 27, 2012, 08:41:36 PM »
Copy the code, paste it on a new document, save it as scriptname.cs
In the unity asset window create a folder called custom_script and put your scriptname.cs in.
Remember that you cannot have multiple scripts with the same name; every script must have is own unique name. Try to duplicate one of the action you already have, change its name (like SetParent2.cs) and you'll be fine: make sure that you change both the filename and the class of the script (public Class SetParent2 : FsmStateAction). The wizard is another story.. bye

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: How to add others custom actions
« Reply #2 on: April 27, 2012, 11:41:07 PM »
If the custom action is posted on the forum:

If there's an attachment, download the file and put it in your projects assets folder. E.g., in Assets/PlayMaker/Actions

If there is only code posted, copy it all (make sure you get it all), paste it into a new text file, and save the file; the file name should match the class name, and the extension should match the language used (usually .cs).