Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

OnParticleTrigger - No GameObject parameter?

Discussion in '5.4 Beta' started by PepinH, Jun 20, 2016.

  1. PepinH

    PepinH

    Joined:
    Sep 7, 2015
    Posts:
    2
    Hey, I've been exploring the new particle trigger module, and I've noticed that there appears to be no way to get the specific collision volume related to a trigger event.

    https://docs.unity3d.com/540/Documentation/ScriptReference/MonoBehaviour.OnParticleTrigger.html

    The doc page for OnParticleTrigger lists a GameObject parameter in its heading, but the actual callback appears to have no such parameter. Is there any way to access this information (e.g. which collision volume a particle entered)?

    Thanks
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Hi, that is a error in the documentation. I'll make sure it gets corrected.

    We would have to provide the information per-particle, in case different particles entered different colliders, but currently we don't provide this information.
     
  3. PepinH

    PepinH

    Joined:
    Sep 7, 2015
    Posts:
    2
    Ah, that's what I thought. I think such information could be very useful in certain cases. Or even something less descriptive like enter and exit callbacks that receive the particle system as a parameter--called on the collision volume objects. In general, it would be useful to know which trigger has been triggered--and by which particle system. Nevertheless, thanks for the info!
     
    Kevz93 and richardkettlewell like this.