简体   繁体   English

像在 Blender 中一样在 Unity 2D 中制作虚线

[英]Make dashed line in Unity 2D like in Blender

I'd like to draw dashed line in Unity with in 2D game like in Blender when you hit B for box select mode.当您为框 select 模式点击 B 时,我想在 Unity 和 2D 游戏中绘制虚线,例如在 Blender 中。

在此处输入图像描述

I tried out lot of tutorials on internet, but nothing seems to work for me.我在互联网上尝试了很多教程,但似乎没有什么对我有用。 I'm using Unity 2019.3.0f3 and C#.我正在使用 Unity 2019.3.0f3 和 C#。 Thanks for your help.谢谢你的帮助。

I think you can create a new material with dashed texture and use Transparent diffuse shader and then use it as line renderer material我认为您可以创建具有虚线纹理的新材质并使用透明漫反射着色器,然后将其用作线渲染器材质

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM