Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    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,128
    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.