I want to fade particle effect - 3D objects but they don’t seem to have an alpha color how can i fade them?
The particles do have an alpha color on them. If you open color settings of the system, you will see at the bottom standard color values R G B (red-green-blue) and the very last A (alpha). Change that value and you will change opacity of the particles.
P.S. If you use gradient staff (for example, in color over lifetime), then there are crawlers at the bottom and at the top. Bottom ones will change color and the top will change alpha.
Oh i am sorry for the misunderstanding, i did not mean the particle system but i mean i want to fade objects with the shader: particles/Vertexlit blendet or particles/Additive (soft) i want to fade them.
Then you need to write to vertex alpha. Because that’s what the particle shader looks at.
Using Unity - Scripting API: MeshRenderer.additionalVertexStreams seems the more practical choice for dynamic mesh changes.
I took a look at it but i am not exactly sure how to use it especially with the colors as a list please help me out with an example.
I had an issue with null reference exception with
MeshRenderer a= prefab.GetComponent ();
a.additionalVertexStreams.colors[0].a =0;
produces: NullReferenceException: Object reference not set to an instance of an object on additionalVertexStreams