09-06-2019, 11:51 PM
4- I ended up writing that custom script. It took 2.5s to instantiate the 200.000 seconds. The script is very minimalistic. Any customization should be done via code. It instanciates the objects at every cache point of the spline. Here it is:
The code executes at Start for my test purpose. Feel free to make it execute elsewhere
Code:
using FluffyUnderware.Curvy;
using UnityEngine;
public class TTT : MonoBehaviour
{
public GameObject GameObject;
public CurvySpline Spline;
void Start()
{
//int count = 0;
for (int segmentIndex = 0; segmentIndex < Spline.Count; segmentIndex++)
{
var segment = Spline[segmentIndex];
for (var cachePointIndex = 0; cachePointIndex < segment.Approximation.Length; cachePointIndex++)
{
GameObject.Instantiate(GameObject, segment.Approximation[cachePointIndex], Quaternion.LookRotation(segment.ApproximationT[cachePointIndex]));
//count++;
}
}
//Debug.Log(count);
}
}
The code executes at Start for my test purpose. Feel free to make it execute elsewhere
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.