- Home /
Question by
GameCraver2020 · Jan 29, 2020 at 02:27 AM ·
c#errorunity 2d2d-platformergizmos
Why can't I see my Gizmos Line??
I'm making a moving platform that follows a path, but a cant visually see that path.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PathDefintion : MonoBehaviour
{
public Transform[] Points;
public IEnumerator<Transform> GetPathEnumerator() {
throw new NotImplementedException();
}
public void OnDrawGizmos() {
if (Points == null || Points.Length < 2) {
return;
for (var i = 1; i < Points.Length; i++) {
Gizmos.DrawLine(Points[i - 1].position, Points[i].position);
}
}
}
}
sharedscreenshot.jpg
(161.2 kB)
Comment
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Unexpected Strange Behavior 0 Answers
Error when loading Unity WebGL 1 Answer
Multiple Cars not working 1 Answer
No Monobehaviour scripts in files 1 Answer