playMaker

Author Topic: ...just another big Custom Action collection (M-Z + Third Party)  (Read 12315 times)

Deek

  • Full Member
  • ***
  • Posts: 133
Link to first half: http://hutonggames.com/playmakerforum/index.php?topic=15458.0

Because the main post listing all of my custom actions exceeded the max. char limit of 20000, I had to split it in half.
So here is the second half containing all actions from category M to Z:

Ecosystem
Action Name
Usefulness
Math:
Float Flip★★★★ (similar to existing action)
Get Percentage Int★★★★
Get Unsigned Float★★★
Get Unsigned Int★★★
Int Flip★★★★
Int Round To Nearest★★★★
Navigation/Pathfinding:
Find Closest Agent★★★★★
Nav Mesh Find Closest Point★★★★
Nav Mesh Agent Get Area Mask★★★
Nav Mesh Agent Move To★★★★★
Physics & Transform:
Enable Collider★★★★
Enable Collider Multi★★★★
Follow Mouse 2D★★★★★
Get GameObject Screen Position★★★
Get Position Add Offset★★★★
Get Rotation Add Offset★★★★
Get Gravity 2d Scale★★★
Get Scale Add Offset★★★★
Reset Transforms★★★
Set Positions★★★★
Random:
Random Characters★★★
Random Float Around Range★★★★★
Random Int Around Range★★★★★
Random Point Between GameObjects★★★★
Random Point On Slope★★★★
Random Weighted Vector3★★
Select Random AudioClip★★★★
Select Random Object★★★★★
Sprite:
Sprite Get Name★★★
StateMachine:
Disable This FSM★★
Enable Fsms★★★★
Get Fsm Component★★
Get GameObject By Fsm Variable Value★★
RestartThisFSM★★
Send Event Random Delay★★★★
Send Events★★★★
Send Event Set Value★★★★★
Send Event Set Multi★★★★
String:
Build String Auto Convert★★★★★
Get String Numbers★★★★
String Append★★★★
String Compare Set Multi★★★
String Contains Switch★★★★★
String Remove★★★
String Remove Chars★★★
String Replace Each Char★★★
String Switch Custom★★★★★
System & Time:
Countup Timer★★★★
Find Asset By Name(Editor only)
Get File Extension★★★
Get TimeScale★★★★
Random Wait Around Offset★★★★★
uGUI:
Debug Variable On Screen★★★★★
Draw Fullscreen Color Advanced★★
Vector:
Vector2 Operator Advanced★★★★
Vector3 Compare★★★
Vector3 Operator Advanced★★★★
______________
Third Party
¯¯¯¯¯¯¯¯¯¯¯¯¯¯
GDE:
GDE Add String★★★
GDE Bool Flip★★★★
GDE Bool Test★★★★
GDE Count Occurrences★★
GDE Create Item★★★★★
GDE Find★★★★
GDE Find Item By Value★★
GDE Float Compare★★★
GDE Float Operator★★★★
GDE Get Random Item★★★★★
GDE Get Schema By Item★★★★★
GDE Has Field Value Changed★★★★
GDE Has Item★★★★★
GDE Int Compare★★★
GDE Int Operator★★★★
GDE Load All Items By Schema★★★★
GDE Load All Keys By Schema★★★
GDE Load Schema List★★
GDE Load String List Custom★★★
GDE Remove Item★★★★★
GDE Remove String★★
GDE Reset Item★★
GDE Schema Get Next Item★★★
GDE Swap Field Values★★
GDE Swap Items★★★
GDE Vector2 Operator★★
GDE Vector3 Operator★★★
GDE Vector4 Operator
NGUI:
NGUI Get Widget Details★★★★
NGUI Label Set Text Advanced★★★★
NGUI Set Sprite Multiple★★★★
NGUI Set Sprite Size★★
NGUI Set Widget Alpha Multi★★★★
NGUI Set Widget Color★★★
NGUI Set Widget Details★★★★
NGUI Sprite Is Visible
NGUI Tools Add Child Advanced★★★★★
NGUI Tools Destroy Multi★★

Edit:
|10.03.18|:
- Added: "Array List Contains Name", "Array Operator", "Build String Auto Convert", "Enable Children In Range", "Get Fsm Component", "Get GameObject By Fsm Variable Value", "Get Unsigned Float", "Get Unsigned Int", "Has Sibling", "Int Sign Test", "List GameObjects Inside Collider", "List GameObjects Inside Collider2D", "String Compare Set Multi", "Vector3 Compare"
- Created a helper class for all the GDE actions, meaning that the script 'GDEHelpers.cs' will be necessary to operate the GDE actions from now on | Added various new GDE actions | Re-worked most the existing ones | merged Float Add, Int Add, Float Multipy and Int Multiply into the respective Float Operator and Int Operator actions
« Last Edit: September 24, 2019, 12:12:45 PM by Deek »

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #1 on: July 14, 2018, 06:56:05 PM »
Hey Deek! :D

Figured I should comment on this post for GDE stuff maybe?

I had an idea for an action I think would be super useful! :D but also wanted to check and see if maybe you had a better way you were going about doing the same thing :)

I'm managing my player inventory through a custom item list in my player data item. I was wondering if there was a was a way to quickly add or take away an item from the list rather than needing to use 'GDE Get String Array' add the item string to the local array/remove it, and then 'GDE Set String Array'?

I had only just found out that the GDE String Arrays are how to get list of custom array item names  ::)




best,

craigz

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #2 on: July 17, 2018, 03:22:22 PM »
Hi craigz,

I think that's the only way you can manipulate an array, by storing its contents temporarily, adding/removing items to/from it and re-applying it to the array and I'm also not aware of any other approach for that, since PlayMaker only supports arrays as collection.

Though to make that process easier, I combined the GDEGetStringArray and GDESetStringArray into one action, which allows to add or remove items or replace the whole array with the given items. I haven't tested it yet, but it should work; would be grand if you could try it out and say if it worked or if you had something else in mind.

This is only a crude implementation and I might create a version later that allows for modifying any array variable-type in one action.

It also seems like your list is of custom type "item", which means that you're probably only retrieving their names when using GDEGetStringArray, but I don't have enough experience with custom items in GDE to assume any negative implications.

Hope that helps.

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #3 on: July 18, 2018, 12:02:04 AM »
Hi Deek,

Whew okay good to know that I was at least doing the best way I knew how :P always felt so cumbersome even with an FSM template for it.

This action almost exactly what my use case is with strings as Item names, and your thoughts on a universal one for adding/removing other variable types would be super useful! Thank you so much! :D

Only issue I see with its direct functionality: Is it possible to make it so the input could take a string variable? Though this probably steps into your thoughts on making it to accept any variable types :)



I just ran some more tests with the action:

Adding appears to work as it should.

While 'remove' and 'replace' seem to do the same thing. Which is replace the array with a new array that ONLY has the inputted string variable  ???

Once again, thank you so much for making this :) I'm more than happy to test (and clearly/proudly using :P)

-craigz
« Last Edit: July 18, 2018, 12:09:18 AM by craigz »

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #4 on: July 18, 2018, 03:22:41 PM »
2nd try: The 'Add Items' array now allows for FsmVariables (don't know why I didn't consider it beforehand  :o) and that remove and replace do the same thing should also be fixed.

I would realise accepting any variable type by writing a custom inspector for this action and only showing/using the FsmArray type that's selected, which means that allowing FsmVariables in those arrays doesn't pose a problem.

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 219
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #5 on: September 08, 2018, 11:45:54 PM »
The GDE actions are missing from the post.  Does anybody know where they are hosted?

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #6 on: September 09, 2018, 10:53:34 AM »
Those actions that I flag as not on the Ecosystem (with a red x-mark) can still be found in my repository as described in the first half.
In the case of GDE actions: https://github.com/justDeek/Useful-Unity-Utilities/tree/master/Custom%20PlayMaker%20Actions/_ThirdParty/GDE%20Customs

If you don't just want to download/copy single GDE actions you'd need to download the whole repository and extract them from Custom PlayMaker Actions/_ThirdParty/GDE Customs/


PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 219
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #7 on: September 09, 2018, 06:39:25 PM »
yeah totally missed it.  Thanks a ton!

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #8 on: January 01, 2019, 09:17:44 PM »
Hi,
Maybe I misunderstand how to use the "Array List Contains Name", I can't get it to work. Or if it's something with latest Unity.

I attached a screenshot if a new scene. It's just one object with an Array list with a prefab in it. As you can see it says it doesn't find anything with the "Potato Data Object".

Did I miss something or is it Unity's new prefabs? I use latest Unity 2018.3 and Playnmaker 1.9.0.p5

Any help much appreciated!

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #9 on: January 02, 2019, 04:00:57 PM »
Hi Daniel and Happy New Year!  ;)

I've checked into the problem that you mentioned and it turns out that there was actually a fault in the action.

Technicalities:
The action goes through each item in the proxy component, temporariliy converts it to a string with the .ToString() extension method and compares that with the given name. The problem is, that .ToString() also appends the type of the object to the string itself (e.g. "Camera (UnityEngine.GameObject)" instead of just "Camera") ... something I didn't account for back then when creating the action (I probably also tested it with a String-Array-List where this behavior doesn't occur).
It now ignores the object type in the name during comparison.

I've added the fixed version to the attachments and will soon update the action on the Ecosystem.
So thanks for pointing it out!
« Last Edit: January 09, 2019, 02:52:17 PM by Deek »

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #10 on: January 02, 2019, 06:53:33 PM »
That worked perfect, thanks for the quick fix! These actions are a real time saver and keep the FSMs and states less cluttered. Thanks for that!

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #11 on: January 24, 2019, 12:41:29 AM »
Hi again Deek! :D

Hope you have been well my friend :)

Just wanted to give a shout and see if you or anyone else has been having trouble with GDE in Unity 2018.3? I noticed my GDEGetStringArray action doesnt seem to be getting recognized anymore? Figured I've give a shout here before giving Celeste a shout xP



best,

craigz

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #12 on: January 24, 2019, 07:05:57 AM »
Hey craigz,
it's all good, man. Hope you have been well, too!

I've tried a fresh install of the latest Unity, PlayMaker and GDE version to see if there's a problem with the GDE actions or if GDE is incompatible with later Unity versions, and noticed that I had to apply the two patches that Celeste posted on the Unity forum regarding ExcelImporter errors and GDEArray actions not showing up in the Action Browser for everything to work.
I think the latter is the cause of your problem, in the sense that sometimes when updating PlayMaker or Unity itself it can't find find the reference to particular scripts because the GUIDs (unique identifiers stored in the .meta files) of these scripts might have changed (this can also happen to components, which leaves you with missing script references). When you open the FSM described in these errors, you will see empty actions where the GDEGetStringArray actions were beforehand.
So you either had to apply that patch before updating Unity or you've already applied it before, breaking the references to certain GDEArray actions.

I hope you've made a backup of your project before updating, because otherwise you need to either manually re-add and configure any missing action (which can become quite cumbersome) or fix the GUIDs yourself as described in the guide here (which is also a bit difficult). At the bottom of that guide it also lists what else might have caused this or rather how to prevent something like this happening in the future. I've also had to go through such problems a few times and they're no fun, but sh*t happens..

If you do have a backup, you can try to replace the GDEGetStringArray.meta file from before the update with the current one (visible in the explorer/finder when viewing hidden files is enabled) and reload the scene to see if the FSM can find the script now. It's important that you haven't saved the scene after the update though, as it also saves these missing-action-placeholders. You could also try to copy the scene from the backup into your active project after the patch has been applied.
When nothing helps, you can still revert back to your previous set-up, stick to it for your current project and only use a higher Unity version when starting a new one.

Hope that offers some clarity or leads on how to fix this. Good luck, though  :P

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #13 on: April 02, 2019, 05:38:50 PM »
Hey Deek! :D

Just going through my tabs and realized I forgot to respond (though you DID have the answer :P shame on me) xD

Luckily I did have backup of the project, and the issue was as you described! Though what was specifically causing my issue was order of importing. Apparently I needed to import the packages before updating to 2018.3 as usual, but then for some reason once updating to 2018.3 all my array actions would disappear. So after update to 2018.3, I closed out of the editor, then just swapped the files/meta in windows explorer, reimported their parent folder and everything linked up correctly.  :o

Thank you for all the help and background knowledge, it really means a lot to me  ;D


Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (M-Z + Third Party)
« Reply #14 on: April 03, 2019, 02:54:49 PM »
Glad that I could help. Have a nice one!