playMaker

Author Topic: Custom action with custom UIHint  (Read 2209 times)

N3uRo

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Custom action with custom UIHint
« on: January 24, 2012, 01:06:39 PM »
Can I make a custom UIHint? I'm going to explain what I want to do.

If you use "UIHint.FSMGameobject", you can view a list of ALL gameobject ignoring your "[CheckForComponent(typeof(NameOfComponent))]".

Can I create a custom UIHint that filters with a tag, component or something like this?

Thanks!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3605
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Custom action with custom UIHint
« Reply #1 on: January 24, 2012, 02:23:31 PM »
It's not possible to create a custom UIHint yet, but we hope to expand the Action Editor in the future (e.g., to allow for custom editors etc.).

If it's a common use case we might add it to the built in UIHints.

Would you want something like UIHint.GameObjectsWithTag("Player") to filter a popup list?

N3uRo

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Re: Custom action with custom UIHint
« Reply #2 on: January 24, 2012, 02:33:27 PM »
The best solution it's to be able to extend this behaviour and customize it on our needs.

But for people that doesn't want or know how to do this it would be useful some cases like:

- Filter gameobjects by a especific tag
- Filter gameobjects with a specific component

I can't think of anything more right now but there are many more useful cases.

With small projects it's not a problem but with big projects with many objects it's a pain, so I think it would be really useful.

aliessmael

  • Playmaker Newbie
  • *
  • Posts: 28
    • View Profile
Re: Custom action with custom UIHint
« Reply #3 on: February 17, 2012, 01:55:23 PM »
I like the idea of Custom Action Editor . because it give more ability to do things.

for me i was looking for solution to make auto complete for text field in my action, but i did not find solution.

aliessmael

  • Playmaker Newbie
  • *
  • Posts: 28
    • View Profile
Re: Custom action with custom UIHint
« Reply #4 on: February 23, 2012, 06:09:31 AM »
today i was looking for solution to my action.
i need to make action which has GameObject member.
i will assign this member with a model prefab.
so what i need to do is to find all audio files which is inside the folder where this prefab model is stored
then save all this audio in my action.
but i can not do this in my action class
because collecting asset information require UnityEditor namespace.

what i think to do is to put button in the action to collect information.

i solve this by manual setup for my action.

custom action editor is highly required.

Thanks.