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 trialkincademccown
292 PointsMy private Transform player; is not showing up in unity.
I cant add the player to the transform inside unity becuase the private Transform player; wont show up in the script inside unity.
kincademccown
292 Points1 Answer
Stijn De Vrij
2,086 PointsThat's becaus private properties don't show up in the Unity editor. You either have to set it to public or specify in your code you want a private value to be visible in the edtor. You can do that by adding the [SerializeField] tag right before the property.
For more information about SerializeField you can check out the Unity documentation here: https://docs.unity3d.com/ScriptReference/SerializeField.html
Best of luck!
Gabriel E
8,916 PointsGabriel E
8,916 PointsHi Kincade, Could you perchance send the link to the video you are working on? I'm sure I can help you, it's been a while since I've done that course. Cheers, Gabriel