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 How to Make a Video Game Game Audio Additional Audio Scripting

Problem with RandomSoundPlayer class

From the moment when code private RandomSoundPlayer playerFootsteps - VisualStudio mention that dont know such a class and suggest make the new one. After I have done that I continue the class, but on the moment of editing of "playerFootsteps" i mentiont that [SerializeField] dosent work, and I dont see it in Unity. What can I do?

Can we see your code please?

Samuel, everything stand ok, when I change "RandomSoundPlayer" on "RandomSoundPlay", I don't know if it is correct, but it is working for now.

RandomSoundPlayer should be the name of one of your class, (or script if you prefer). Perharps you named your class RandomSoundPlay instead of RandomSoundPlayer, in which case you should use the former.