Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetWaypoints () {
- // Now, this function basically takes the container object for the waypoints, then finds all of the transforms in it,
- // once it has the transforms, it checks to make sure it's not the container, and adds them to the array of waypoints.
- var potentialWaypoints : Array = waypointContainer.GetComponentsInChildren( Transform );
- waypoints = new Array();
- for ( var potentialWaypoint : Transform in potentialWaypoints ) {
- if ( potentialWaypoint != waypointContainer.transform ) {
- waypoints[ waypoints.length ] = potentialWaypoint;
- }
- }
- }
Add Comment
Please, Sign In to add comment