|
|
|
@ -18,10 +18,26 @@ namespace CameraRoll.Client.Tool {
|
|
|
|
|
lr.positionCount = 2;
|
|
|
|
|
lr.SetPosition(0, dir.normalized * -AxisLength);
|
|
|
|
|
lr.SetPosition(1, dir.normalized * AxisLength);
|
|
|
|
|
lr.material = new Material(Shader.Find("Unlit/Color"));
|
|
|
|
|
lr.material.color = color;
|
|
|
|
|
lr.material = new Material(Shader.Find("Unlit/Color")) {
|
|
|
|
|
color = color
|
|
|
|
|
};
|
|
|
|
|
lr.startWidth = 0.02f;
|
|
|
|
|
lr.endWidth = 0.02f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void LinkPreviousPoint(GameObject point) {
|
|
|
|
|
GameObject line = new GameObject("Link");
|
|
|
|
|
line.transform.SetParent(transform, false);
|
|
|
|
|
LineRenderer lr = line.AddComponent<LineRenderer>();
|
|
|
|
|
lr.useWorldSpace = true;
|
|
|
|
|
lr.positionCount = 2;
|
|
|
|
|
lr.SetPosition(0, transform.position);
|
|
|
|
|
lr.SetPosition(1, point.transform.position);
|
|
|
|
|
lr.material = new Material(Shader.Find("Unlit/Color")) {
|
|
|
|
|
color = Color.magenta
|
|
|
|
|
};
|
|
|
|
|
lr.startWidth = 0.01f;
|
|
|
|
|
lr.endWidth = 0.01f;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|