All right, so the first thing that we wanna do is get our sun moving.
So we've got this scripts folder.
This contains a number of pre-created C
sharp scripts that we're gonna be using in our project today.
Most notably for this part we're gonna be using the RotateAround script.
So if you click on a script you can kinda see a preview over here.
You don't edit a scripts directly within Unity.
You typically open up external script editing tool or text editing tool.
Unity comes with a tool called Mono Develop,
which we'll talk about later in this course.
But for now, we're not gonna actually do any coding, we're just gonna use
these pre created scripts that come with these set of assets.
So, over here, let me go ahead and select on the Sun,
and of course I can hit the F key to zoom right in.
We're gonna attach that RotateAround script,
often they're called Behaviors right to the sun.
So, there's many ways of doing everything in Unity.
It is a very visual environment.
So I could literally click and hold on the RotateAround script,
I can drag it over and drop it right in the scene view on the Sun game object.
I could also drop it right on the sun in the hierarchy, or
if the sun is selected, I can also drop it right in the inspector.
So all three of those methods do the exact same thing.
If I let go here,
it will add that RotateAround script to the sun game object.
Scripts basically become components.
Just like the transform component,
we've got another component now in our inspector, and
you can see it says RotateAround.
The script has two additional properties that we can set.
One is the Target.
The Target is what we wanna rotate around, and the second is the Speed.
If you don't set a target,
it will basically rotate around the center of the world, I believe.
But we can actually set a target.
These things, once again, you can drag and drop things.
Or when you've got the little dot next to it, you can click on that.
It will open up a selection tool, which will show
all the possible things that you can select of that certain data type.
So this is looking for a transform attached to a GameObject, and
these are all of our GameObjects that have transforms on them in the world.
And we want the Sun to spin around itself, so I can just go ahead and select Sun.
So once again I could do it that way through that little selection pop-up.
I could have also just grabbed the Sun game object, dragged it over here, and
dropped it into that slot.
The final thing I wanna do is set the speed.
And this script is set to