10-06-2017, 09:33 AM
(10-05-2017, 08:54 PM)Roger Cabo Wrote: I think that have to do with Initializing the complete spline system at start.
Are you sure the splines are fully initialized when you use it?
Code:IEnumerator Start() {
foreach (var Spline in FindObjectsOfType(typeof(CurvySpline)) as CurvySpline[]) {
while (!Spline.IsInitialized) {
yield return null;
}
}
}
You can check this, if you wait a second, then calling your function.
public int frames;
Code:void Update(){
frames++;
if (frames > 100) run your function to create the arrow.
}
only an idea.
Thank you for the idea. I've check if the spline is initialized with a simple
Code:
Debug.Log ("spline -> " + launcherSpline.IsInitialized);