> For the complete documentation index, see [llms.txt](https://university-of-games.gitbook.io/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://university-of-games.gitbook.io/welcome/products/graphics-pack/golf-pack.md).

# Golf Pack

Golf Pack technical docs — 34 modular 3D minigolf track pieces, materials, playable prototype, and MiniGolf C# scripts for Unity.

![Golf Pack](https://assetstorev1-prd-cdn.unity3d.com/package-screenshot/ef5276d9-b29d-4464-915b-54eba4d48e75.webp)

![Golf Pack course](https://assetstorev1-prd-cdn.unity3d.com/package-screenshot/2718088b-1d84-441a-9191-f44c786ec834.webp)

![Golf Pack gameplay](https://assetstorev1-prd-cdn.unity3d.com/package-screenshot/04d9f409-9ebf-4700-a4c5-2be369853968.webp)

**Golf Pack** (Minigolf Starter Pack) is the only **3D** graphics pack in this series: **34 modular course pieces** plus a complete playable minigolf prototype with physics, aiming, camera, scoring, and UI.

{% hint style="success" %}
**Specs:** 34 FBX meshes (100–350 tris) · 35 prefabs · 8 C# scripts · 2 demo scenes
{% endhint %}

{% hint style="info" %}
**Path in project:** `Assets/Golf Pack/`
{% endhint %}

## Package contents

| Content   | Details                                           |
| --------- | ------------------------------------------------- |
| Meshes    | 34 FBX track pieces                               |
| Prefabs   | 34 track prefabs + `Prefabs/Game/GolfBall.prefab` |
| Materials | 5 materials + `Golf Ball.physicMaterial`          |
| Textures  | Yellow / Green / Blue themes (512×512)            |
| Scripts   | 8 files in namespace `MiniGolf`                   |
| Scenes    | Catalog demo + Game Starter Kit                   |

## Folder structure

```
Golf Pack/
├── Materials/
├── Mesh/              34 × .FBX
├── Prefabs/           track*.prefab + Game/GolfBall.prefab
├── Scene/
│   ├── Golf Pack DEMO.unity
│   └── Golf Pack Game Starter Kit.unity
├── Scripts/           MiniGolf gameplay
├── Textures/
└── README.md
```

## Color themes

Assign a ready-made material from `Materials/` to track renderers:

* Yellow · Green · Blue (shared atlas texture)

## Scripts (`MiniGolf` namespace)

| Component           | Purpose                                                               |
| ------------------- | --------------------------------------------------------------------- |
| `GolfBall`          | Physics ball: `Shoot()`, rest detection, out-of-bounds, extra gravity |
| `GolfHole`          | Cup trigger — fires `BallHoled`                                       |
| `GolfCourse`        | Hole list, par, strokes, UnityEvents                                  |
| `GolfAimController` | Mouse slingshot aiming + power LineRenderer                           |
| `GolfCameraFollow`  | Orbit / zoom follow camera                                            |
| `GolfHUD`           | Optional uGUI scoreboard                                              |
| `AutoMeshColliders` | Auto MeshColliders under a course root                                |
| `GolfInput`         | Old Input Manager + new Input System                                  |

{% hint style="info" %}
Scripts are **render-pipeline agnostic** and have no hard dependencies on tags, layers, or scene names.
{% endhint %}

## Demo scenes

| Scene                                    | Description                                        |
| ---------------------------------------- | -------------------------------------------------- |
| `Scene/Golf Pack DEMO.unity`             | Catalog of all 34 pieces + showcase 9-hole course  |
| `Scene/Golf Pack Game Starter Kit.unity` | Playable prototype: aim, score, UI, 3 color themes |

**Controls (Game Starter Kit):** LMB drag to aim/shoot · RMB orbit · scroll zoom · **R** reset ball · **T** restart course.

## Quick start — custom course

{% stepper %}
{% step %}

### Assemble track

Compose `Prefabs/track*.prefab` under one root. Add `AutoMeshColliders` on the root.
{% endstep %}

{% step %}

### Add ball

Drop `Prefabs/Game/GolfBall.prefab` into the scene.
{% endstep %}

{% step %}

### Define holes

For each hole: tee transform on the lane + `GolfHole` trigger in the cup.
{% endstep %}

{% step %}

### Wire gameplay

Add `GolfCourse`, `GolfAimController`, `GolfCameraFollow` (optionally `GolfHUD`). Assign references.
{% endstep %}
{% endstepper %}

## Technical notes

* Pack uses centimetre-scale meshes — `GolfBall` applies `gravityScale = 60`.
* Note the prefab typo: `trackHillCrosing_01` (missing “s”).
* Track categories include straights, curves, crossings, hills, hill holes, and ends (`track_01`…`trackEnd_01`).

***

Publisher: [University of Games on Asset Store](https://assetstore.unity.com/publishers/25633) · <hello@universityofgames.net>
