I'm still having the most basic of issues. I can see how all the example levels work, but they're all pre-setup in the editor. I'm trying to do stuff completely in code because the game levels are generated at runtime. I get stuck pretty much right at the start trying to do something like...
GameObject cameraGO = MyCamera.gameObject;
cameraGO.AddComponent<FollowSpline>();
I can get it to work using SplineWalker as the component to add, but the docs say to not use this.
Even if I set this part up in the editor (adding the FollowSpline via the editor) I can't figure out how to access the component at runtime...I would have expected this to do it: someGO.GetComponent<FollowSpline>()...
Is there some sample code for how to do this?
I figured out that to access this stuff, you need to specify the entire path to the code. So you do like this...
FluffyUnderware.Curvy.FollowSpline FS = cameraGO.AddComponent<FluffyUnderware.Curvy.FollowSpline>();
GameObject cameraGO = MyCamera.gameObject;
cameraGO.AddComponent<FollowSpline>();
I can get it to work using SplineWalker as the component to add, but the docs say to not use this.
Even if I set this part up in the editor (adding the FollowSpline via the editor) I can't figure out how to access the component at runtime...I would have expected this to do it: someGO.GetComponent<FollowSpline>()...
Is there some sample code for how to do this?
I figured out that to access this stuff, you need to specify the entire path to the code. So you do like this...
FluffyUnderware.Curvy.FollowSpline FS = cameraGO.AddComponent<FluffyUnderware.Curvy.FollowSpline>();