Hey and welcome back to the Unity tutorials on third
person camera scripting and mecanium. The first thing we
need to do is start our project. And as
you all know, all great projects start with file
new. So let's go to a file new project.
And before we create this, let's create a
new repository GitHub. The way that we'll
be doing these tutorials, I'll basically be copying and
code from progressions of how I worked on this project
and we'll see step by step how this project is
going to evolve. So let's go to github.com
If you don't have an account,
you should sign up. It's free and I
just kinda want to preface this with everything that we're
doing from this point on, uh, is pretty,
pretty much optional until we get to the scripting
portion. I just want to go through how to
create a project on GitHub and have everything synced
especially important, Um, if you're trying to work
with somebody. So let's create a new uh name.
So we'll go with Unity Third Person Camera Tutorial.
Well, we'll just go a Third Person Tutorial.
So give it a description, a sample project showing
the third person camera behavior and mecanium animations. So
we're going to go and make this public, give
it a README. We want to use the
Unity, git ignore. And what this does is
it's going to create a file in your repository that
lets you ignore a bunch of the unnecessary files,
like your metadata files, um, like your library
files. And we're going to do a couple of
settings so that we can create actual metadata files that
we can sync along with our assets. So now
we've created this, let's go ahead and open up
the GitHub Windows app, which if you don't
have this, it's a great app. You should
download it and let's go ahead and clone this guy.
So we'll clone in Windows and this will open
up the GitHub app for us. Here we
go. And it's going ahead and cloning right here.
So it should just take a second. So
we've got Unity third person tutorial. All right,
cool. So we've got our git ignore file and
we've got the README. The first thing we
want to do is create our project and we want
to create this project and then copy it into the
Git folder. You can't actually create a new project
inside of a git repository because uh Unity requires an empty
folder. So if we went to our Git directory,
we would have to if you wanted to put
it inside of this third person tutorial thing. It
doesn't let you do it because you are to create
it in an empty folder. So what I usually
do is I just create like a temp folder and
this is kind of hacky. But it's just the
way that has to be done. Unfortunately. Uh
we don't want to important assets because I'll just be
copying all those in my hand. Go ahead and
create it. Do I want to save change?
Yeah, go ahead and save it changes to that.
Hopefully it will create our new project. Okay.
Cool. And also just another thing I'll be
using Unity Pro for this, but you can get
a copy if you're a student from studio to for
Um I think it's about $100. So it's pretty
cheap. Or you can alternatively use the free version.
I don't think we're using many features that are
pro only and if we are, I'll be sure
to point them out. Okay. So now we've
got this, we got our project. Everything looks
good. Let's go ahead and just save are scene
in a new folder. So we'll just call these
scenes and we'll just call this locomotion because we're gonna
be testing locomotion in this scene. Go ahead and
save that. Now. You want to close out
of out of Unity and you'll see in the GitHub
app. Hopefully these files will show up.
If not, ah will show up in a second.
Refresh real fast. And what we want to
do is you want to take those files and copy
them from this temp folder, descend to the main
Root Directory and you can go ahead and delete this
temp folder now because we don't need that anymore.
Because now our our Unity project is inside the Git
directory in the root, which is which is much
more uh just just cleaner to open other. Oh,
that's gone now. So go ahead and open
up the git inside your GitHub folder. Open
up your, open up your scene. Okay?
Cool. No problems there. And hopefully everything should
be good now. All right. Let's see.
Check the GitHub app. Yes. Uncommitted changes.
So these are all the new things that we've
added. These are all of our settings files.
And our one scene. Another thing I want to
show is how to set up your project for git.
The things that you want to do or you want
to go into the project settings and you want to
go into the editor. So right now, the
version control mode is disabled. You want to use
meta files. And what this does is going to
create a small file alongside each of your assets and
it's going to have the information stored with it.
So if you don't know, changed animation setting or
something like that, like an import setting, it
will start there instead of in some folder in the
libraries folder. It's a mess if you don't do
this. Um and you want to say force text,
this is a pro feature here. It's not
necessary, but it's going to save your scene file,
which you can see here now just turned into
text. So before that wasn't text, if you
rewind the video, you kind of look at it
and you can see that this is much nicer because
now we can diff we can kind of, when
we're merging our scenes, we can have a look
at this and maybe a line or two changes.
And that's a lot better because we can merge the
two files together instead of before you would have to
take one the older version of the scene of the
newer version of scenes. So this is a lot
better. Right, cool. Now we're all set
up. I'm going to pause the video from it.
I'm going to copy in a whole ton of
assets and it's all the assets we're gonna need for
the for the project. So I'll see you in
one minute.