Guest User

Untitled

a guest
Aug 19th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Waypoint : MonoBehaviour
  5. {
  6.     public Transform[] points;
  7.  
  8.     void Awake()
  9.     {
  10.         initPoints();
  11.     }
  12.  
  13.     public void initPoints()
  14.     {
  15.         points = new Transform[transform.childCount];
  16.         for (int i = 0; i < points.Length; i++)
  17.         {
  18.             points[i] = transform.GetChild(i);
  19.         }
  20.     }
  21. }
Add Comment
Please, Sign In to add comment