Skip to main content

Unity Engineer Setup Guide

This guide will help you set up your development environment for working on m00m world as a Unity engineer. Follow these steps to get started.

Prerequisites

  • Unity Hub: Download and install Unity Hub to manage your Unity installations.

  • Unity Editor: Install our active version of Unity (6000.0.33f1) through Unity Hub.

  • Git: Ensure you have Git installed on your machine. You can download it from git-scm.com.

    • 🍎 Mac users can use brew install git to install Git via Homebrew.
  • Rider: Download and install JetBrains Rider for Unity development.

Step 1: Clone the Game Project Repository

  1. Open a terminal or command prompt.
  2. Ensure you have Git installed and configured. You can check by running git --version. A version of Git 2.39 or higher is recommended.
  3. Git LFS (Large File Storage) is required for handling large assets in the repository. Install Git LFS by following the instructions on Git LFS installation.

For macOS, you can install it via Homebrew: brew install git-lfs

For Windows, you can download the installer from the Git LFS website.

  1. After installing Git LFS, run the following command to initialize it: git lfs install
  2. Ensure you have proper SSH credentials setup for GitHub on your machine. Follow GitHub's guide if needed.
  3. Navigate to the directory where you want to clone the repository, eg. ~/m00m/.
  4. Clone the Game Project repository
> git clone git@github.com:m00m-world/Unity-World-Mobile.git GameProject --recurse-submodules
> cd GameProject
> git submodule update --remote --force
> git branch -m "temp/testing-setup"
> git checkout temp/testing-setup
  1. This will clone the Game Project and its submodules, including the Art Project.
  2. Open the cloned project in Unity Hub and select the 6000.0.33f1 version of Unity.
  3. Allow Unity to import the project. This may take some time depending on your machine's performance and the size of the project.
  4. Once the import is complete, you should see the project structure in the Unity Editor.
  5. Navigate to the Assets/m00m/Scenes/Sandbox.unity scene and open it.
  6. Enter Play Mode to ensure everything is working correctly. You should see the sandbox environment loaded with basic interactions. You should also see full materials and models. Traverse the hierarchy to ensure everything is in place.
  7. If you encounter any issues, check the Unity Console for errors and resolve them as needed. Common issues may include missing packages or incorrect project settings.
tip

To learn more about the two-project structure, view our Overview page.

Step 2: Configure Rider for Unity

  1. Open Unity > Settings > External Tools in Unity Editor.
  2. Set the External Script Editor to Rider.
  3. Ensure that the Editor Attaching option is enabled.
  4. Open the project in Rider by right-clicking on the Assets folder in Unity and selecting Open C# Project.
  5. Select 'Trust Project' when prompted in Rider to allow it to access the project files.
  6. Rider will automatically configure the project and download necessary plugins. Wait for the indexing to complete.

Step 3: Install Required Packages

  1. Open the Unity Package Manager by going to Window > Package Manager.
  2. Ensure the following packages are installed - you may require a seat or key from a team lead or senior developer:
    • Odin Inspector: For enhanced editor functionality.

Step 4: Configure Version Control

warning

Co-working in a Unity project is a delicate task. Ensure your work is partitioned and isolated, always use our formatting and branching standards, and communicate with your team to avoid conflicts. Determine the scope of affected assets before making changes, and always test your changes in a separate branch before merging into the main branch.

  1. Open the Unity Editor and go to Edit > Project Settings > Editor.
  2. Confirm the Version Control mode to Visible Meta Files.
  3. Confirm the Asset Serialization mode to Force Text.
  4. Confirm your current working branch, which should be a feature branch like feature/your-feature-branch. If you are unsure, consult with your team lead or senior developer.
tip

While collaborating with others in Unity, follow these quick tips to prevent merge conflicts and other issues:

  • Edit / Create prefabs instead of scenes
  • If you're not sure if a prefab is safe to work in or adjust, create a new temporary prefab to hold your work until it can be confirmed.
  • Confirm with all other Unity engineers if scene changes must be made

Step 6: Configure Unity 6 Build Profiles

  1. Open the Unity Editor and go to File > Build Profiles.
  2. Confirm that you have the appropriate build profile selected for your role. If you are unsure, consult with your team lead or senior developer.

Step 5: Make Changes & Test

  1. Make your changes in the Unity Editor or Rider.
  2. To test your changes, enter Play Mode in Unity and verify that everything works as expected.
  3. Use the Unity Console to check for any errors or warnings during runtime.
  4. During development, you can use the Unity Profiler to monitor performance and identify any bottlenecks in your code or assets.

Step 6: Commit & Push Changes

  1. Open a terminal or command prompt in the Game Project directory.
  2. Run the following commands to stage, commit, and push your changes:
>   git add .
> git commit -m "Your commit message here"
> git push origin feature/your-feature-branch
  1. Ensure that you follow the project's commit message guidelines and branch naming conventions.
  2. If you are working on a feature branch, create a pull request (PR) to merge your changes into the main branch. Ensure that your PR is reviewed by at least one other team member before merging.
  3. If you are working on a hotfix or urgent change, create a hotfix branch from the main branch and follow the same process for committing and pushing changes.

Additional Resources

💡 Want to explore all the Unity-specific in-editor tools available to you? Visit the Tools page for a full breakdown of Dev Shortcuts, EditorFirebase, and our custom GraphView debugger.