Hi
What is the correct way for an instantiated prefab to follow a spline already present in scene?
So far I'm trying this in the spline controller attached to the prefab:
void Awake()
{
var mySpline = GameObject.FindGameObjectWithTag(splinetag);
CurvySpline mInitialSpline = mySpline.gameObject.GetComponent("CurvySpline") as CurvySpline;
m_Spline.Refresh();
}
Any help much appreciated
What is the correct way for an instantiated prefab to follow a spline already present in scene?
So far I'm trying this in the spline controller attached to the prefab:
void Awake()
{
var mySpline = GameObject.FindGameObjectWithTag(splinetag);
CurvySpline mInitialSpline = mySpline.gameObject.GetComponent("CurvySpline") as CurvySpline;
m_Spline.Refresh();
}
Any help much appreciated