public Track LoadTrack(string name)
    {
        string            jsonData    = Resources.Load <TextAsset>("track_datas/" + name).text;
        TrackPointsSource trackPoints = JsonUtility.FromJson <TrackPointsSource>(jsonData);

        return(new Track(trackPoints));
    }
예제 #2
0
    public Track(TrackPointsSource _trackPointsSource)
    {
        points = new Vector3[_trackPointsSource.Length];

        int j = 0;

        foreach (Vector3 v in _trackPointsSource)
        {
            points[j++] = v;
        }
    }