Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class Waypoint : MonoBehaviour
- {
- public Transform[] points;
- void Awake()
- {
- initPoints();
- }
- public void initPoints()
- {
- points = new Transform[transform.childCount];
- for (int i = 0; i < points.Length; i++)
- {
- points[i] = transform.GetChild(i);
- }
- }
- }
Add Comment
Please, Sign In to add comment