Tired of hitting balls on the same range every day? Switch things up by building your own custom practice ranges for OpenGolfSim.

  1. Getting Started
  2. Building Your Course in Unity
    1. Guides and Tools
    2. Add Start & Aim Positions
  3. Create Course Build
    1. Create New AssetBundle
    2. Export Checklist
    3. Course Export Tool
    4. Course Poster
  4. Loading and Testing Your Course

Getting Started

  1. First create a new blank Unity 6000.2 HDRP project.
  2. Install our SDK by dragging the OGS Course SDK files into your new project. (The latest SDK files can be found on our Discord)

Building Your Course in Unity

Add terrains or meshes to build your practice range environment. We recommend a terrain with a size of 600m x 600m for ranges, which is a little over 600 square yards.

Guides and Tools

There’s a ton of guides, tutorials, and tools out there to help you create terrains and environments in Unity. To get you started, we’ve curated a few helpful resources for learning how to build terrains in Unity.

  • Unity 6.2: Sculpt the terrain with a brush

    For simple scenes, you can use the built-in Unity terrain brushes to manually raise and lower the terrain.

  • Course Terrain Tool

    Try using our new experimental tool to find and create height maps from real-world lidar data.

  • Gaia Pro VS

    For creating biomes and planting mass trees/vegetation in Unity. This version of Gaia is compatible with OpenGolfSim’s version of Unity (6000.2), and makes quickly planting lots trees or painting terrain quick and easy.

  • R.A.M 3 - River Auto Material 3

    Another useful Unity asset for carving and shaping terrain and generating rivers and lakes.

Add Start & Aim Positions

  1. Create an empty game object named StartPoint and position it in the scene where you want your player to hit from.
  2. Create an empty game object named AimPoint and position it in the scene where you want your player to aim initially.

Create Course Build

To export your new range as a playable course for OpenGolfSim, you’ll need to export your Unity scene as an asset bundle.

Create New AssetBundle

  1. In Unity, locate and select your scene in your Assets folder.
  2. At the bottom of the Inspector you should see an AssetBundle section. Click the dropdown and add create a new asset bundle.
  3. Enter the name of your course all lowercase, and without spaces. (e.g. spacerange)

Export Checklist

To prep your scene for export to a playable course bundle, you’ll need to make sure to check a few things:

  • Make sure any cameras in your scene are disabled or removed.

  • Remove any runtime-based scripts / dependencies.

    Note: One limitation of Unity asset bundles is that scripts are not exported with the scene. So avoid using or adding any scripts that are used at runtime.

Course Export Tool

  1. Make sure to set a bundle version in your Unity project’s settings.
    1. Select Edit > Project Settings > Player
    2. Enter a Product Name and Version for your course.
  2. Build your course file using our OpenGolfSim Tools
    1. Select Tools > OpenGolfSim > Build Course
  3. Click Select Output Folder to set the build location of your course.

  4. Enter a description for your course.

  5. Click the Export button.

Once the export has completed, you should see a few files have been created. One with your asset bundle name, and a file named course.json. This file contains some metadata about your course package.

Example course.json:

{
    "name": "Space Range",
    "course": "spacerange",
    "version": "1.0.1",
    "description": "A simple driving range set in space.",
    "gameMode": 0
}

Course Poster

You can place a 1280x720 JPEG file in your course folder named poster.jpg to represent your course in the library.

Course posters look best when they are an actual rendering of your course level, not a photograph of the course. It also shouldn’t contain any text or logos.

Loading and Testing Your Course

  1. Make sure OpenGolfSim Desktop is not currently running. (Right click the logo in the status bar and select Quit OpenGolfSim)

  2. Create a new folder for your course within the OGS Courses directory.

    %USERPROFILE%/AppData/Roaming/opengolfsim-desktop/ogs_courses/spacerange

  3. Copy/move both your exported asset bundle file and course.json file into that folder. You should end up with a folder structure like:

    • spacerange/spacerange
    • spacerange/course.json
    • spacerange/poster.jpg
  4. Fire up OpenGolfSim and you should see your new course listed in your course library.


Having trouble? Come chat with us on our Discord.