Changing the materil alpha not working

Hi there,

i am tryn to use ether this function or modify the shader directly, but lowering the alpha to get much more transparency does not work, not for the editor nor the ingame gizmos.

DrawingManager.instance.gizmos.surfaceMaterial.SetColor("_Color", new Color(1.0f, 1.0f, 1.0f, 0.1f));

what am i doing wront here?

as i understand changing this means making all gizmos in the scene more or less tranparent right? i cannot control individual gizmos independently?

because i am creating a grid ingame to show the player where he can build and the grid needs to be very transparent and on the other hand i use ALINE to draw a unit selection circle which needa nearly no transparency.

It might be easier to adjust the global alpha in the ALINE project settings. See the bottom of the get started guide: Get Started With ALINE - ALINE

You can pass a color with a lower alpha to each gizmo individually, yes.

Thank you so much for the great support! works like a charm.

I’m glad it works for you now :slight_smile:

If you are happy with the package, a review and/or a rating on the asset store goes a long way towards supporting further development of the package :slight_smile: