Search Unity

Feedback Allow parent (base) Mono's to trigger Awake() type funcs

Discussion in 'Editor & General Support' started by dpt2, Apr 23, 2022.

  1. dpt2

    dpt2

    Joined:
    Jun 15, 2021
    Posts:
    50
    I understand the initial explanation of why, but it's not intuitive and disallows all kinds of fun stuff you can do.

    For example, with Photon, I could make a parent `PunBehaviourAutoView` where if I inherit it, it'll auto spawn a photonView with a guaranteed-unique value without any effort (not sure why Photon puts me to work to ensure all these are unique manually).

    Sure, I could call it at child.Awake() or override Awake() and call base.Awake(), but that's not very graceful.

    Let the parents also trigger these kinds of events in addition to the children! It just makes sense(TM).