Question by
blackash · Dec 09, 2015 at 07:00 PM ·
c#scriptingbasicsloops
How do I make a loop in a C# script?
I want my player to be moving all the time
Comment
Answer by Dave-Carlile · Dec 09, 2015 at 07:04 PM
If the purpose of your loop is to move an object then you probably don't need your own loop. Unity has a built-in game loop. You can create an Update method in a script and Unity will call it for you every frame. Within that method you can move your object a little bit each frame based on Time.deltaTime.
I would recommend using the Learn link at the top of the page and go through some tutorials. Unity Answers isn't really a good place to teach or learn programming skills.