public static void GizmosDrawLineRenderer(LineBase source, LineRendererBase renderer) { switch (renderer.StepMode) { case StepModeEnum.FromSource: GizmosDrawLineFromSource(source, renderer); break; case StepModeEnum.Interpolated: GizmosDrawLineInterpolated(source, renderer); break; } }
protected virtual void OnDrawGizmos() { if (Application.isPlaying) { return; } if (source == null) { source = gameObject.GetComponent <LineBase>(); } if (source == null || !source.enabled) { return; } GizmosDrawLineRenderer(source, this); }