-
-
Save michidk/0d74698d433a32863aeb0d9e802bf1fa to your computer and use it in GitHub Desktop.
LineRendererObjectLine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Default | |
{ | |
[RequireComponent(typeof(LineRenderer))] | |
public class LineRendererObjectLine : MonoBehaviour | |
{ | |
public GameObject[] GameOjects; | |
private LineRenderer lineRenderer; | |
void Awake() | |
{ | |
this.lineRenderer = GetComponent<LineRenderer>(); | |
} | |
void Update() | |
{ | |
for (int i = 0; i < GameOjects.Length; i++) | |
{ | |
lineRenderer.SetPosition(i, GameOjects[i].transform.position); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment