Playmaker Forum
PlayMaker News => General Discussion => Topic started by: mohvisuals 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?
-
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
-
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).