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 trial

Game Development

Cannot attach Main Camera to Game Manager Field: "Follow Camera"

I'm not sure why I can't drag my Main Camera into the Follow Camera field specified by our Game State script.

I've followed every step up to this point in fairly good detail. I'm double checking my naming conventions but I can't seem to figure this one out.

Figured this one out actually... I keep solving my errors as soon as I have given up and posted to the forums haha.

The issue was within the Main Camera object. The script component I added to follow the player(frog) was named FollowTarget initially and did not update when I renamed the script to FollowCamera.

After replacing FollowTarget (outdated) to FollowCamera, the fields matched and I was able to drag the FollowCamera script into the 'Follow Camera' field in the Game Manager script.

1 Answer

Thanks for updating when you find solutions anyway.