create line in unity
// you need the LineRenderer component in your object
var line = gameObject.AddComponent<LineRenderer>();
line.SetPosition(0, startingPoint);
line.SetPosition(1, middlePoint);
line.SetPosition(2, endPoint);
create line in unity
// you need the LineRenderer component in your object
var line = gameObject.AddComponent<LineRenderer>();
line.SetPosition(0, startingPoint);
line.SetPosition(1, middlePoint);
line.SetPosition(2, endPoint);
unity inspector draw line
//============================================================
void GuiLine( int i_height = 1 )
{
Rect rect = EditorGUILayout.GetControlRect(false, i_height );
rect.height = i_height;
EditorGUI.DrawRect(rect, new Color ( 0.5f,0.5f,0.5f, 1 ) );
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us