Example #1
0
        protected override void OnSceneGUI()
        {
            base.OnSceneGUI();

            if (Event.current.type == EventType.Repaint)
            {
                if (m_MoveAction.IsPlacedOnBrick())
                {
                    var start = m_MoveAction.GetBrickCenter();
                    var end   = start + m_Action.transform.forward * m_MoveAction.GetRemainingDistance() * LEGOBehaviour.LEGOHorizontalModule;
                    Handles.color = Color.green;
                    Handles.DrawLine(start, end);
                    Handles.DrawSolidDisc(end, Camera.current.transform.forward, 0.16f);
                }
            }
        }