Hi.
I'm currently making an editor to build a kind of track (instantiating prefabs with a set of connected points from a spline).
Everything works fine, but when i change of scene and come back to the one containing my objects, all connections between splines are lost.
I use :
any clues ?
I think i found, but could you confirm it's the rught way to do :
I'm currently making an editor to build a kind of track (instantiating prefabs with a set of connected points from a spline).
Everything works fine, but when i change of scene and come back to the one containing my objects, all connections between splines are lost.
I use :
Code:
firstPoint.gameObject.GetComponent<CurvySplineSegment>().ConnectTo(lastPoint.gameObject.GetComponent<CurvySplineSegment>(), CurvyConnection.HeadingMode.Sharp, CurvyConnection.SyncMode.SyncPosAndRot);
SceneView.RepaintAll();
any clues ?
I think i found, but could you confirm it's the rught way to do :
Code:
EditorUtility.SetDirty(firstPoint.GetComponent<CurvySplineSegment>());
EditorUtility.SetDirty(lastPoint.GetComponent<CurvySplineSegment>());