Search Unity

Particle System with prefabs

Discussion in 'Prefabs' started by LabMatti, Apr 24, 2019.

  1. LabMatti

    LabMatti

    Joined:
    Jan 19, 2018
    Posts:
    58
    Hi! I understood that with the Unity particle System is impossible to do, but can someone suggest an asset store product that can be used to build a particle System with a gameobject as particle?

    I will have a sphere with a light attached as particle...is that possible?

    Thanks!
     
  2. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Actually, you can have Mesh particles with attached lights as per current implementation, no need to use a prefab for this :)

    As far as I'm aware of, especially now that we've got nested prefabs, you'd need to pass a prefab to the particle system, which would introduce a significant overhead if not stripped away from extra components and properly dealt with.

    Yet, if your goal is to actually use "Composite Entities" in large numbers, you should probably have a look at Entities, Jobs, Burst compiler, and, in general, DOTS :)
     
  3. LabMatti

    LabMatti

    Joined:
    Jan 19, 2018
    Posts:
    58
    Thank you for your answer...my goal is to interact with these spheres and let them have a plausible physic...

    They should be like 200-500 and after 2 second from the collision with the player, they should start to moving back to their starting position.

    Probably it is gonna be too heavy on the performance, but can you explain how to pass a prefab to the particle system?

    Thank you!
     
  4. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    As far as I know you can't, so I can't explain it :)
    The only prefab you can pass to a particle system is a Light prefab, and it only gets used to get the light info to be emitted by the particle Light module.

    200-500 light sources all visible to the camera? Well, I hope you are using deferred rendering at least :)

    I suspect the effect you're trying to pull off doesn't actually require hundreds of light sources unless you're really into CG and movie production, with some intense scene going on.

    I suggest you to have a look at this asset:
    https://assetstore.unity.com/packages/vfx/particles/spells/living-particles-105817