17 lines
481 B
C#
17 lines
481 B
C#
using Supabase;
|
|
using UnityEngine;
|
|
|
|
public class SupabaseBootstrap : MonoBehaviour
|
|
{
|
|
public static Client Client { get; private set; }
|
|
|
|
async void Awake()
|
|
{
|
|
var s = await SupabaseSecretsLoader.LoadAsync();
|
|
var opts = new SupabaseOptions { AutoConnectRealtime = false, AutoRefreshToken = true };
|
|
Client = new Client(s.url, s.anonKey, opts);
|
|
await Client.InitializeAsync();
|
|
Debug.Log("Supabase initialized from secrets.");
|
|
}
|
|
}
|