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 The Unity Editor and Scene Setup Place Assets in the Scene View

Why is my player object outside the environment? I modified it's spatial location but cannot move the frog with arrowkey

When I first dragged my player asset to the hierarchy it placed the frog outside of the environment. I manually changed the X position on both the player object and the camera to make them both go inside the environment. For some reason though, when I did this manually, the script isn't running and I cannot move my frog with the arrow keys.

1 Answer

With the amount of information given it's hard to give a definite answer. Did you add the player asset to the scene during runtime? Did you change the transform values during runtime? If so, don't forget to click the scene window again after editing anything in the inspector, otherwise your button press events won't be used by your game, but rather for navigating the inspector window.

If this was not your problem, maby you could copy paste some code so I can take a look.