playMaker

Author Topic: NGUITools.Destroy - REQUEST[SOLVED]  (Read 872 times)

Budde88

  • Full Member
  • ***
  • Posts: 162
    • View Profile
NGUITools.Destroy - REQUEST[SOLVED]
« on: August 09, 2017, 04:38:19 AM »
Hey Devs,

So basically we have the NGUITools.Addchild action that allows us to spawn prefabs into NGUI tables, but we don't have NGUITools.Destroy to destroy items in tables.
The regular destroy action doesn't work as mentioned here.

http://www.tasharen.com/forum/index.php?topic=12175.0

Thanks
« Last Edit: August 09, 2017, 11:51:58 PM by jeanfabre »

Deek

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: NGUITools.Destroy - REQUEST
« Reply #1 on: August 09, 2017, 09:45:53 AM »
Here you have it (see attachment).
With this you can select several GameObjects within one action. If one of the GameObjects doesn't have any NGUI component, it gets destroyed normally, so you can use this action for all of your destructible needs ;)

Optionally repositions afterwards or only destroy the children of the specified GameObjects.
Tested it with several scenarios, but if you find any bugs or wish for different/additional functionalities, let me know.

I also have created more custom NGUI actions which you can find here:
http://hutonggames.com/playmakerforum/index.php?topic=15458.0
Including NGUIToolsAddChildAdvanced, with which you can set the name, position, rotation and scale of your freshly created instance immediately in the same action; that I find to be very helpful.

Keep in mind that there is also a "Request Action" section in this forum, just saying  ::)

Budde88

  • Full Member
  • ***
  • Posts: 162
    • View Profile
Re: NGUITools.Destroy - REQUEST
« Reply #2 on: August 09, 2017, 09:50:50 AM »
Wow, that was fast!

Thank you so much, I usually post on the request forum, but that part is a lot quieter ;)

I will def check out the link too as NGUI actions are priceless for my development process.

Deek

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: NGUITools.Destroy - REQUEST
« Reply #3 on: August 09, 2017, 10:03:41 AM »
Always glad when I can help, especially when it comes to actions for third party assets, since there aren't a lot of people out there that use both PlayMaker and those assets and have the expertise in creating custom actions or coding in general.