Sitemap
Lem Apperson

Lem Apperson

Seeking employment using Uniy3D software solutions. Learning C++ and Unreal to expand my skills.

Supabase with Unity & C#

Setting Up Supabase

4 min readApr 11, 2025

--

Press enter or click to view image in full size

Supabase provides a powerful backend solution for Unity game developers, combining PostgreSQL, authentication, and storage in one platform. This guide walks through the initial setup — future articles will explore each feature in depth.

Creating a Supabase Project

Step 1: Sign Up

  • Go to Supabase [https://supabase.com/] and sign up (GitHub, Google, or email).
  • Select “New Project” from the dashboard.
Press enter or click to view image in full size

Step 2: Configure Project

  • Name: Choose a project name (e.g., MyUnityGame_Dev).
  • Database Password: Set a secure password (store it safely).
  • Region: Pick a region closest to your players for lower latency.
  • Pricing Plan: Start with the Free tier for development.

Step 3: Wait for Deployment

  • Supabase spins up your PostgreSQL database and services (~2 minutes).
    Once ready, note the Project URL and API Keys (under Settings > API).
Press enter or click to view image in full size
Press enter or click to view image in full size

Basic Service Configuration

Database (Preview: Article 9)

  • Navigate to Table Editor and create your first table (e.g., players).
  • Enable Row-Level Security (RLS) for data protection:
CREATE POLICY "Enable read access for authenticated users" 
ON players FOR SELECT USING (auth.role() = 'authenticated');
Press enter or click to view image in full size
Note: This SQL coding is for a table named ‘players’.

Authentication (Preview: Article 4)

  • Go to Authentication > Providers and enable:
    — Email/password
    — Social logins (Google, Apple, etc.).
Press enter or click to view image in full size
  • Test sign-up with the built-in Auth UI.

Storage (Preview: Article 7)

  • Navigate to Storage > Buckets and create a bucket (e.g., game_assets).
  • Set RLS policies to control file access:

Get Lem Apperson’s stories in your inbox

Join Medium for free to get updates from this writer.

CREATE POLICY "Allow uploads for authenticated users"
ON storage.objects FOR INSERT TO authenticated WITH CHECK (true);
Press enter or click to view image in full size

Essential Dashboard Settings

API Keys & Security

  • Project URL: Found under Settings > API (e.g., https://xyz.supabase.co).
  • Keys: Use the anon (client-side) and service_role (server-side) keys cautiously.
    (Look above to Step 3)

Realtime & SQL Editor

  • Realtime: Enable for live multiplayer features (toggle in Database > Replication).
Press enter or click to view image in full size
  • SQL Editor: Save frequent queries for quick access.
    (See above under Database/ Row Level Security)

Local Development (Optional)

  • Install the Supabase CLI for local testing:
brew install supabase/tap/supabase # macOS supabase init && supabase start
Press enter or click to view image in full size

Further Reading

Official Documentation & SDKs

Unity-Specific Integration

Tutorials & Videos

Community & Troubleshooting

Key Tools

--

--

Lem Apperson
Lem Apperson

Written by Lem Apperson

Seeking employment using Uniy3D software solutions. Learning C++ and Unreal to expand my skills.