How to change DepthTest by script?

Avatar
  • updated
  • Answered

 Draw.RingDshed(); I want to change it's sortinglayer to Aways,how can i do?

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Pinned replies
Avatar
Freya Holmér creator
  • Answer
  • Answered
Draw.ZTest = CompareFunction.Always;
Avatar
君莫笑
Quote from Freya Holmér
Draw.ZTest = CompareFunction.Always;

thx,  other problem

when i create it by menu bar in editor,it is not show in play model even i update vertion to 4.

and use c# draw command it lose hdr effect of color.

...

[ColorUsage(true, true)] 
public Color InnerStartColor;

...

_discColors.innerStart = InnerStartColor;
_discColors.innerEnd = InnerEndColor;
_discColors.outerStart = OuterStartColor;
_discColors.outerStart = OuterEndColor;

Draw.DiscGeometry = DiscGeometry;
Draw.Matrix = transform.localToWorldMatrix;
Draw.Radius = Radius;
Draw.Thickness = Thickness;
Draw.RadiusSpace = ThicknessSpace;
Draw.ThicknessSpace = ThicknessSpace;
Draw.ZTest = ZTest;
Draw.UseDashes = Dashed;
if(Dashed)
Draw.DashStyle = DashStyle;

switch (DiscType)
{
case DiscType.Disc:
Draw.Disc(_discColors);


Avatar
Freya Holmér creator
  • Answer
  • Answered
Draw.ZTest = CompareFunction.Always;