PhotonView observe script on child?

Options
I'm struggling trying to find out a way for the PhotonView component to Observe one of the scripts on a child object. You can't drag the component itself, because it will only Observe the transform.

Is there a way to do this or do I need a separate PhotonView component on the child?

Comments

  • Tobias
    Options
    You should be able to assign the observed component of a child at runtime via code.
    I don't know if we will implement this as editor feature (drag&drop), though. Is this a thing that's more often needed than I noticed?
  • Nimdanet
    Options
    Hi Tobias!

    I'm having this "issue" too. Normally my hierarchy is a GameObject as the parent with all my scripts and colliders. As a child, I have the "graphic", either a sprite or a 3D model. So yes, I'm facing this problem every single game I made. xD
  • bdar
    Options
    "You should be able to assign the observed component of a child at runtime via code."
    Hi, can you post a quick code on how this is done correctly? I know that the most recent version of Photon finally solves this, but for the older projects sake :)