playMaker

Author Topic: uGUI Actions  (Read 43957 times)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
uGUI Actions
« on: September 24, 2014, 11:18:33 AM »
I'm playing around with uGUI in 4.6b17 and creating relevant actions. Post requests and I'll see what I can do.

[EDIT]
Please check Ecosystem or the Wiki for the latest UI Actions. Most of the stuff in this thread was made during the 4.6 UI beta and is Legacy.
« Last Edit: August 27, 2015, 10:47:01 AM by jeanfabre »
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: uGUI Actions (WIP)
« Reply #1 on: September 24, 2014, 11:21:38 AM »
uGUI button event.

Really simple right now, just sends an event when a button is clicked. Be sure you use Next Frame Event for loops.

[EDIT]
UPDATED button action: http://hutonggames.com/playmakerforum/index.php?topic=8987.msg43021#msg43021

Fixes a couple of bugs. Leaving the old one here for reference as it's a different action name to avoid breaking things on update.
« Last Edit: December 15, 2014, 08:08:14 AM by Lane »
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: uGUI Actions (WIP)
« Reply #2 on: September 24, 2014, 12:09:34 PM »
uGUI Set Slider Properties

For setting the properties of a slider.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: uGUI Actions (WIP)
« Reply #3 on: September 24, 2014, 12:21:34 PM »
uGUI Get Slider Properties

For grabbing the properties of a slider. There was a nifty value for getting a Normalized Value as well! How convenient =)
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: uGUI Actions (WIP)
« Reply #4 on: September 24, 2014, 12:45:09 PM »
uGUI Toggle Event

Fire an event based on the status of a Toggle, or store its value.

Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: uGUI Actions (WIP)
« Reply #5 on: September 24, 2014, 07:34:32 PM »
Very good work Lane!
Will this actions replace the old UI system or with come as a package?
Cheers
Seb

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: uGUI Actions (WIP)
« Reply #6 on: September 24, 2014, 08:30:36 PM »
This is all new stuff, we'll compile it into a package eventually. The Legacy GUI system is still in Unity and accessible. All of the Unity GUI is done in it, so it isn't going away.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

3d_Artist1987

  • Beta Group
  • Full Member
  • *
  • Posts: 157
Re: uGUI Actions (WIP)
« Reply #7 on: September 24, 2014, 11:40:17 PM »
very useful and thanks for making

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: uGUI Actions (WIP)
« Reply #8 on: September 25, 2014, 05:20:50 PM »
uGUI Component Enabled Flag

This is still sort of experimental. Not precisely sure how to go about enabling/disabling gui components yet or what the best approach is for this sort of action.

You can target the GameObject with the components on it and...:
  • Choose from a dropdown list of what you want to enable/disable.
  • Target a specific component.
  • Leave both of those options blank and enable/disable ALL normal uGUI components on the object

Typically it seems like each gameobject will only contain one or maybe two component types, such as Button and Image, so I'm assuming you'll want to turn them all off if you are using this sort of thing and figured it would be fastest if all of the default options set it so that you could just put the action on and choose the Enabled/Disabled flag you want.

There is no issue with turning off the wrong button since its impossible to have more than one per game object, making the "all on/off" idea make the most practical sense to me.

If you need to turn off children, you'll probably be better off with Activate GameObject which turns the whole object and its children off. This is intended to target specific gameobjects or components and leave the children intentionally undisturbed.

If you want an alternative you can use Enable Behaviour, which is basically a fancy version of the Specific Component slot on this action.

The types of components you can currently affect:
Button, Text, Image, RawImage, Slider, Scrollbar, Toggle & InputField

Let me know how it goes.
« Last Edit: September 25, 2014, 05:30:33 PM by Lane »
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Ride

  • Playmaker Newbie
  • *
  • Posts: 7
Re: uGUI Actions (WIP)
« Reply #9 on: October 12, 2014, 06:31:45 AM »
Hi Lane! Thank you so much for these, much appreciated!

Got any more in works?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: uGUI Actions (WIP)
« Reply #10 on: October 12, 2014, 01:15:31 PM »
Jean is working on some very cool stuff for the more advanced portions of uGUI and I have some revisions to make to these for gc and such but I haven't had time to do much with them lately.

Do you have any specific needs for actions here?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

stuhp84

  • Playmaker Newbie
  • *
  • Posts: 2
Re: uGUI Actions (WIP)
« Reply #11 on: October 13, 2014, 03:30:54 PM »
First of all thanks for these! I've also been in the process of checking out the new uGUI and these actions will help save some time.

Since you're taking requests I think a Set uGUI text action is something that would be awesome.
« Last Edit: October 13, 2014, 03:33:55 PM by stuhp84 »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

stuhp84

  • Playmaker Newbie
  • *
  • Posts: 2
Re: uGUI Actions (WIP)
« Reply #13 on: October 13, 2014, 09:48:05 PM »
Thanks for pointing me in the right direction! Did not find it through search  :-[

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: uGUI Actions (WIP)
« Reply #14 on: October 16, 2014, 02:25:25 PM »
Yeah the search function is clunky. I have best results using the actual button and search screen rather than the search field in the top right of the page header.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D