-
Hi there, just got ALINE today, very quick to setup! I’m trying to use a SolidCircleXY, but it’s slightly transparent. How do I control its opacity?
-
Unrelated question: Is there a way to make the Draw.WidthLineWidth scope scale with screen size/resolution? So if I use size 5, it’ll look the same whether it’s 720p or 1080p?
Oops I thought I had included a screenshot but totally forgot:
Hi
- solid gizmos are transparent by default. Though I am considering to change this default.
You can override the transparency using:
var desiredBaseAlpha = 1.0f;
DrawingManager.gizmos.surfaceMaterial.SetColor("_MainColor", new Color(1.0f, 1.0f, 1.0f, desiredBaseAlpha);
- It’s not possible to do it reliably if you have multiple cameras, but I suppose you can always do something like:
Draw.WidthLineWidth(Mathf.Max(1, 0.04 * Screen.width));
1 Like
- Hmmm I couldn’t get this one to work for me. I tried these lines of code:
DrawingManager.Init();
DrawingManager.instance.gizmos.surfaceMaterial.SetColor("_MainColor", new Color(1.0f, 1.0f, 1.0f, 1.0f));
I tried that both in Start() and in Update(), and I tried using Draw.ingame (my desired use case) calls as well as non-ingame Draw calls, but SolidCircleXY still came out transparent. Any ideas what I might be doing wrong?
- Awesome! I’m only using one camera so this works out great!
Thanks for the reply and get well soon! Drink lots of water…
Ah, sorry. That should have been
DrawingManager.instance.gizmos.surfaceMaterial.SetColor("_Color", new Color(1.0f, 1.0f, 1.0f, 1.0f));