Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBill Merickel
11,420 PointsCan't add field that stores transfer component
At 3:16, under the Follow Camera Script, I can't import the Player into the Camera script, there is no player option, only script.
3 Answers
Bill Merickel
11,420 PointsYou have to type [SerializeField] or something like that above it.
tuukka uosukainen
22,107 PointsOh, this was confusing.
I managed to drag the the Player (Transform) after I added the [SerializeField], like Bill Merickel suggested. In the video Nick drags it before writing the field so I got a little lost there :) All good now.
Add this before trying to drag:
[SerializeField] private Transform player;
Thanks Bill!
Bill Merickel
11,420 PointsNever mind, my mistake.
Brandon Stewart
3,434 PointsHow did you fix it?