Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Code not working

I'm using Unity 5.5.1 and when adding the code to FlyMovement.cs it supposed to add center with an inspector field for a transform component and it doesn't work. When switched back to Unity from MonoDevelopment i see the code in the inspector http://imgur.com/a/C3uxX . I'll also show the code in MonoDevelopment here http://imgur.com/a/Td5sB . I don't know if this has anything to do with it being a newer version or if i've put the code in wrong (i've put the code in a few times).

1 Answer

Henrique Vignon
Henrique Vignon
Courses Plus Student 6,415 Points

But have you added the script to the fly prefab?

the serialized field will not show in the inspector when you just select the script, it'll show only when said script is added as a component to an object.