A lightweight yet powerful Unity game boilerplate (template) for rapid prototyping and scalable production.
A production‑ready Unity boilerplate/template to kickstart new games fast. It ships with a clean, decoupled architecture, ready‑to‑use managers, pooled audio/particles, UI helpers, haptics, input handling, and editor tooling. Designed for readability, modularity, and scalability. This separation keeps your game logic independent from engine lifecycle, enabling faster iteration and easier testing.
- Engine: Unity (URP supported)
- Language: C#
- 🎵 Audio System — Key‑based SFX/music, optional 3D, pooling, PlayerPrefs.
- 💨 Particle System — Key‑based pooled particles with auto‑recycle.
- 📱 Haptics — Cross‑platform feedback API with enable/disable and cooldown.
- 🖥️ UI Core — Animated
UIPanelbase (DOTween fades), audio/haptic hooks. - 🧠 Input Handler — Centralized input with lock/unlock and
PlayerInputSO.
- 💰 Economy — Secure
CurrencyWallet(PlayerPrefs + signature) to deter tampering. - ⚙️ Managers — Lightweight, safe
MonoSingleton<T>pattern with guards. - 🪶 Utilities — Colored logger, save debounce, preference keys.
- 🧩 UI Utilities —
Button.BindOnClick(owner, action)with auto‑unbind. - 🧰 Prefabs — Ready‑to‑drop manager/UI prefabs under
Resources/*.
🎬 Run the sample scene to see audio, haptics, and UI fades in action.
- Click “Use this template” on GitHub to generate your own repository.
- Or fork and rename your project repo.
- Suggested repo topics for discoverability:
unity,boilerplate,unity-template,game-template,unity-urp.
- Clone the repo into your Unity project
Assetsor import as a template. - Open with a Unity version compatible with URP.
- Open
Assets/_Game/Scenes/GameScene.unityand press Play.
- Keep provided prefabs in scene or instantiate at runtime:
Resources/Managers/AudioManager.prefabResources/Managers/HapticManager.prefabResources/Managers/ParticleManager.prefabResources/Managers/GameManager.prefabResources/Managers/LevelManager.prefab(if used)Resources/UI/UI.prefab(root UI, if used)
Assets/SerapKeremGameKit/
Resources/
Managers/ # Drop‑in manager prefabs
UI/ # Common UI prefabs (HUD, Settings, etc.)
Particle/ # Particle pool/player prefabs
Audio/ # Audio pool/player prefabs
Scripts/
Audio/ # AudioManager, AudioData, pooling
Particles/ # ParticleManager, data, pooling
Haptics/ # HapticManager, HapticType
UI/Core/ # UIPanel base (DOTween fades)
UI/Utilities/ # ButtonExtensions
InputSystem/ # InputHandler + PlayerInputSO
Economy/ # CurrencyWallet
LevelSystem/ # GameManager, State/Level managers
Utilities/ # TraceLogger, SaveUtility, PreferencesKeys
Singleton/ # MonoSingleton
Scenes/SampleScene.unity
Register clips on AudioManager via the inspector using AudioData entries with Key and Clip.
// Play by key
AudioManager.Instance.Play("ui_click");
// Play 3D at position
AudioManager.Instance.PlayAt("coin_tick", transform.position);
// Music
AudioManager.Instance.PlayMusic(backgroundClip);
AudioManager.Instance.StopMusic();
// User settings
AudioManager.Instance.SetEnabled(true); // persists in PlayerPrefs
bool enabled = AudioManager.Instance.IsEnabled();Create ParticleData list on ParticleManager and call by key.
ParticleManager.Instance.PlayParticle("coin_pop", transform.position);Enable/disable and play with basic types.
HapticManager.Instance.SetEnabled(true);
HapticManager.Instance.SetGlobalIntensity(0.8f);
HapticManager.Instance.Play(HapticType.Light);UIPanel handles fade in/out and optional audio/haptics hooks.
public class SettingsPanel : UIPanel
{
// Call Show()/Hide() to animate and play hooks
}public class MyUIButton : MonoBehaviour
{
[SerializeField] private Button _button;
private void Awake()
{
_button.BindOnClick(this, OnClicked); // auto removes listener on destroy
}
private void OnClicked() { /* ... */ }
}Attach InputHandler and assign PlayerInputSO.
if (InputHandler.IsInitialized)
{
InputHandler.Instance.LockInput();
// ...
InputHandler.Instance.UnlockInput();
}CurrencyWallet.Instance.Add(100);
// PlayerPrefs + signature (tamper‑safe) storage
bool ok = CurrencyWallet.Instance.TrySpend(50);
int total = CurrencyWallet.Instance.Coins;- TraceLogger: Colored logs with caller info in Editor/Development builds.
- Toolbars: Time scale/level toolbars under
Scripts/Editor(if included). - URP Setup:
GameManagerreads current URP asset and applies shadow distance.
- Click “Use this template” on GitHub to create a new repo from this boilerplate.
- Replace company/game identifiers (namespace, product name) in
ProjectSettingsas needed. - Swap sample assets with your own; keep managers and core systems.
- Add your own gameplay modules in
Scripts/and hook into the provided managers.
(All dependencies are optional but recommended for full feature set.)
- TextMeshPro
- TriInspector
- Toolbar Extender
- DOTween
- Toony Colors Pro
- Epic Toon FX
- GUI Blue Sky
- Unity URP (project SRP)
If a package is missing, import it or remove related usages.
- Addressables integration for audio/particles
- Mobile haptic plugins (advanced patterns)
- Sample gameplay loop and more UI screens
Pull requests welcome. Please follow the project code style: descriptive names, clear structure, and avoid deep nesting. Use consistent naming (PascalCase for classes, camelCase for fields) and avoid allocations in runtime loops. Prefer pooling for frequently spawned objects.
This project is licensed under the MIT License - see the LICENSE file for details.