Projectile Project Thumbnails

Making this, I created a prefab with a child using the GunFlash in a Mesh Renderer first, which gave a nice thumbnail.

Then I added a particle system to that, but because of having two renderers it creates an issue: The particle system doesn’t manipulate the original mesh and so it ends up with one stationary mesh and one rotating. I didn’t care for how that could look in flight (not to mention the jerky reset at 5s of life).
mesh-with_particle

Unfortunately disabling/removing the Mesh Renderer takes away the thumbnail

Is there a way to get a nice static thumbnail for prefabs that are using a particle system to control the render?

Or would it be best to just have the renderer turned on so it has a thumbnail and then in Projectile.cs Start() just do a test to turn it off.

if (GetComponentInChildren<ParticleSystem>() != null)
{
    GetComponentInChildren<MeshRenderer>().enabled = false;
}

Or perhaps, better - use a setting in the script in case of other variants
(or invisible projectiles - they’ll never see ‘em comin’)

[SerializeField] bool disableMesh;

//...

if (disableMesh)
{
    GetComponentInChildren<MeshRenderer>().enabled = false;
}

This might be a better question to take to the Unity Forums.

Hopefully I have it in the right place over there to get some visibility. It doesn’t seem likely it will be an issue but it makes me itch.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms