playMaker

Author Topic: [SOLVED] Child Drop Parent?  (Read 1971 times)

j0hnbane

  • Playmaker Newbie
  • *
  • Posts: 13
[SOLVED] Child Drop Parent?
« on: August 29, 2016, 08:06:22 PM »
Hello there!

I have a Parent Game Object with several child Objects. When I remove one of the child Objects, how do I get that child to detect it is no longer a child?

Not sure if I'm over thinking this or what.

Thanks!
« Last Edit: August 29, 2016, 11:26:37 PM by j0hnbane »

j0hnbane

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Child Drop Parent?
« Reply #1 on: August 29, 2016, 08:32:36 PM »
And I've been also looking for the other way as well. Checking if it has a parent object.

I'm picking up objects and need certain things to happen on parenting.

I've dug through the ecosystem and I'm at a loss.

j0hnbane

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Child Drop Parent?
« Reply #2 on: August 29, 2016, 11:26:18 PM »
I've worked out the parent detecting a child or not. I'm still getting used the syntax used to describe what I'm trying to do.

Game Object Has Children and Game Object is Child of.

I try to do a thorough search on these forums, wiki, google, etc of what I'm attempting to do before posting in this forum.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [SOLVED] Child Drop Parent?
« Reply #3 on: August 30, 2016, 05:00:53 AM »
Hi,

yes, indeed PlayMaker already feature actions such as GameObjectHasChildren, GetChildCount, GameObjectIsChildOf

If you want a gameobject to be aware of a reparenting, it's not possible until Unity 5.3. I just updated the PlayMaker Utils on the Ecosystem with a new component called "TransformEventsBridge", so get the latest PlayMaker Utils and use that to send events when ever the parent or children changed. Warning, this is only available int Unity 5.3 or newer.

 Let me know how it goes.


 Bye,

 Jean