2 using System.Collections.Generic;
11 private GameObject widget;
14 private GameObject rootNode;
16 #region PRIVATE_MEMBER_VARIABLES 18 private Vector3 widgetPos;
20 private LineRenderer line;
21 #endregion //PRIVATE MEMBER VARIABLES 23 #region UNITY_MONOBEHAVIOUS_METHODS 26 root = rootNode.transform.position;
27 widgetPos = widget.transform.position;
28 line = gameObject.GetComponent<LineRenderer>();
30 line.SetPosition(0, root);
31 line.SetPosition(1, widgetPos);
37 root = rootNode.transform.position;
38 widgetPos = widget.transform.position;
39 line.SetPosition(0, root);
40 line.SetPosition(1, widgetPos);
42 #endregion //UNITY MONOBEHAVIOR METHODS
Draws a line from the widget to the rootnode, updating as widget position changes ...