Our VR project uses Unity
as the Editor/Game Engine. Our project is essentially a whole bunch of files where these files collectively make up our game. To manage the versions and existence of these files as we collectively work on the project, we'll be using Git
as our source control tool.
Git
manages things called repositories
. A repository is just a folder with a whole bunch of files and subfolders! Therefore, we can think of our VR Project as analogous to a repository, where:
/CSPSY484-FinalProject─┐
│
├─/484Project (Our Unity Project)
│
├─/common (Repository media, like the .gif you see at the top)
│
├─/docs (Our Canvas assignments)
│
├─LICENSE (A trivial but necessary software license)
│
└─README.md (A Markdown file, or literally the file you're reading right now! Github will automatically 'render' or display these files when placed in a repository.)
* the '/' character denotes a folder!
We need to download two software applications to work on our project:
On the Unity download page, scroll to find the appropriate version for your system and select the relevant:
If you're on macOS, follow these steps to discover your architecture:
- Go to the apple logo, and click about this mac
- Look in the information box, it should give details like Storage, memory, and processor.
- If your processor is a INTEL processor, its X64
- If it says Apple M1 or M2, it’s arm.
Once both software applications are installed, open up Github Desktop.
- Select
File
>Options
>Accounts
, then sign in with your GitHub account. - Select
File
>Clone Repository
> (Under your repositories)Stehfyn/CSPSY484-FinalProject
>Clone
- Make sure you remember the path to where you cloned (downloaded) the repository! For me it was:
- Launch Unity Hub
- Select
Open
> find where you cloned the repository, then select and open484Project
On Windows, that looks something like this:
- Opening the project may take a long time to load as it builds the necessary files and binaries
Once Unity
has finished opening our project, we should see something like this:
First, Fetch origin
in Github Desktop
to retrieve the most recent version of the project:
Find the Project
window at the bottom of the screen, and double select Assets
>Scenes
>MainScene
to load MainScene
in the Editor.
Our first commit will be to create a new Scene
file to act as our personal workspace that we can work on or test things out without affecting MainScene
. Since we are not using branches or know what kinds of prefabricated items we need just yet, we will use personal Scene
files as a workaround.
To create a personal Scene
that uses our MainScene
as a template, we can create a copy of MainScene
and rename it:
- With the
MainScene
file selected, selectEdit
>Duplicate
, and should see a newScene
file namedMainScene 1
- Select
MainScene 1
, then double-click its name and rename it to<YourName>Scene
Github Desktop
should now see your updated changes, for me it looks like:
To commit these changes from Github Desktop
:
- Add a summary of your changes (required)
- Add a description of your changes (optional)
- Select
Commit to main
- Select
Push origin
to push these changes to our public repository
If you now refresh our Github repository webpage, you will now see your commit is now available for everyone else:
When working on the project make sure to Fetch origin
before making a commit in Github Desktop
to ensure your commits do not conflict with others' changes. To avoid these conflicts as best one can, it is best to Fetch origin
often while working on the project.