Skip to main content

Lesson 1: Unity Project Setup

In this first lesson, you'll set up a new Unity project specifically designed for Reinforcement Learning simulation.

๐ŸŽฏ Learning Objectivesโ€‹

By the end of this lesson, you'll have:

  • A properly configured Unity project
  • Essential packages installed
  • Project structure organized for RL development

๐Ÿ“‹ Prerequisitesโ€‹

Before starting, ensure you have:

  • Unity 2022.3 LTS installed
  • Unity Hub configured
  • Basic understanding of Unity interface

๐Ÿ› ๏ธ Step-by-Step Setupโ€‹

1. Create New Projectโ€‹

  1. Open Unity Hub
  2. Click "New project"
  3. Select "3D (Built-in Render Pipeline)"
  4. Name your project: "AntsSaga_RL"
  5. Choose a location and click "Create project"

2. Configure Project Settingsโ€‹

Build Settingsโ€‹

  1. Go to File > Build Settings
  2. Select "PC, Mac & Linux Standalone"
  3. Choose your target platform
  4. Click "Switch Platform"

Player Settingsโ€‹

  1. In Build Settings, click "Player Settings"
  2. Set Company Name: "MLVisual"
  3. Set Product Name: "Ants Saga RL"
  4. Set Version: "1.0.0"

3. Install Essential Packagesโ€‹

Package Managerโ€‹

  1. Go to Window > Package Manager
  2. Switch to "Unity Registry"
  3. Install the following packages:
    • Input System (for agent controls)
    • Cinemachine (for camera management)
    • TextMeshPro (for UI text)

Custom Packagesโ€‹

  1. In Package Manager, click the "+" button
  2. Select "Add package from git URL"
  3. Add: com.unity.ml-agents (if available)

4. Organize Project Structureโ€‹

Create the following folder structure in your Project window:

Assets/
โ”œโ”€โ”€ Scripts/
โ”‚ โ”œโ”€โ”€ Agents/
โ”‚ โ”œโ”€โ”€ Environment/
โ”‚ โ”œโ”€โ”€ Managers/
โ”‚ โ””โ”€โ”€ Utils/
โ”œโ”€โ”€ Prefabs/
โ”‚ โ”œโ”€โ”€ Agents/
โ”‚ โ”œโ”€โ”€ Environment/
โ”‚ โ””โ”€โ”€ UI/
โ”œโ”€โ”€ Materials/
โ”œโ”€โ”€ Textures/
โ”œโ”€โ”€ Scenes/
โ”‚ โ”œโ”€โ”€ MainScene.unity
โ”‚ โ””โ”€โ”€ TrainingScene.unity
โ””โ”€โ”€ Settings/
โ”œโ”€โ”€ InputActions.inputactions
โ””โ”€โ”€ ProjectSettings.asset

โœ… Verificationโ€‹

To verify your setup is correct:

  1. Check Package Installation: All packages should show "Installed" status
  2. Verify Folder Structure: All folders should be created and organized
  3. Test Scene Creation: Create a new scene and save it

๐ŸŽฏ Next Stepsโ€‹

Once your project is set up:

  1. Proceed to Lesson 2: Environment Design
  2. Review Getting Started for troubleshooting
  3. Check Glossary for any unfamiliar terms

๐Ÿ’ก Tipsโ€‹

  • Save frequently: Use Ctrl+S to save your work
  • Use version control: Consider setting up Git for your project
  • Document changes: Keep notes of any custom configurations

Great! Your Unity project is ready for RL development. Let's move on to designing the environment!