Version 1.34.2 | Production Ready | Unreal Engine 5.5+
This guide covers all configuration aspects of the Supabase UE5 Plugin, from basic connection setup to advanced production configurations.
The simplest way to configure Supabase is through the USupabaseManager static interface:
// Create connection object
USupabaseConnection* Connection = NewObject<USupabaseConnection>();
Connection->SupabaseServerUrl = TEXT("https://your-project.supabase.co");
Connection->SupabaseCredentials.AnonymousKey = TEXT("your-anon-key");
// Initialize through Manager
USupabaseManager::InitializeSupabase(this, Connection);
Use the Initialize Supabase node in Blueprint with your connection settings:
https://your-project.supabase.coThe plugin automatically validates your connection configuration:
// Connection validation happens automatically
if (!Connection->SupabaseServerUrl.IsEmpty() &&
!Connection->SupabaseCredentials.AnonymousKey.IsEmpty())
{
// Connection is valid
}
The USupabaseSubsystem provides centralized configuration management:
USupabaseSubsystem* Subsystem = GetGameInstance()->GetSubsystem<USupabaseSubsystem>();
// Enable debug logging
Subsystem->SetDebugLogging(true);
// Configure connection health checks
Subsystem->StartConnectionHealthChecks();
// Set active connection
Subsystem->SetActiveConnection(Connection);
// Automatic connection health checks
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Health")
float HealthCheckInterval = 30.0f; // seconds
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Health")
int32 MaxConnectionRetries = 3;
// Email/Password authentication
FRegistrationOptions RegOptions;
RegOptions.bRequireEmailConfirmation = true;
RegOptions.RedirectTo = TEXT("https://yourapp.com/auth/callback");
// Phone authentication
UAsyncRegister::RegisterWithModeAsync(
this,
TEXT("+1234567890"),
TEXT("password123"),
ERegistrationMode::PhonePassword
);
Configure different authentication key types:
enum class ESupabaseKey : uint8
{
Anonymous, // Public operations
Authenticated, // User-specific operations
Service // Admin operations
};
// Advanced API request configuration
UAsyncApiRequest::ApiRequestAdvanced(
this,
URL,
EHttpMethod::POST,
Headers,
Payload,
30.0f, // Timeout in seconds
true, // Validate SSL
TEXT("application/json") // Content type
);
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HTTP")
float DefaultTimeoutSeconds = 30.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HTTP")
float OperationTimeoutSeconds = 60.0f;
For game state persistence:
// PersistentMap configuration
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Persistence")
FString TableName = TEXT("game_state");
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Persistence")
bool bAutoSaveEnabled = true;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Persistence")
float AutoSaveInterval = 60.0f; // seconds
// Batch processing configuration
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Batch")
int32 BatchSize = 50;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Batch")
float BatchProcessInterval = 1.0f;
// Performance settings
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Performance")
bool bUseBatchProcessing = true;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Performance")
int32 MaxConcurrentOperations = 10;
// Development configuration
Connection->SupabaseServerUrl = TEXT("https://dev-project.supabase.co");
Connection->SupabaseCredentials.AnonymousKey = TEXT("dev-anon-key");
Connection->bEnableDebugLogging = true;
Connection->bValidateSSL = false; // Only for development
// Production configuration
Connection->SupabaseServerUrl = TEXT("https://prod-project.supabase.co");
Connection->SupabaseCredentials.AnonymousKey = TEXT("prod-anon-key");
Connection->bEnableDebugLogging = false;
Connection->bValidateSSL = true;
Connection->bEnableHealthChecks = true;
// Secure credential handling
struct FSupabaseCredentials
{
FString AnonymousKey; // Public operations
FString UserAuthenticatedKey; // User-specific operations
FString ServiceKey; // Admin operations (server-side only)
};
// SSL validation settings
UPROPERTY(EditAnywhere, Category = "Security")
bool bValidateSSL = true;
UPROPERTY(EditAnywhere, Category = "Security")
bool bVerifyPeer = true;
UPROPERTY(EditAnywhere, Category = "Security")
FString CertificateBundle; // Optional custom certificates
// Connection pool settings
UPROPERTY(EditAnywhere, Category = "Performance")
int32 MaxConnectionPoolSize = 20;
UPROPERTY(EditAnywhere, Category = "Performance")
float ConnectionPoolTimeout = 30.0f;
// Memory optimization
UPROPERTY(EditAnywhere, Category = "Memory")
bool bEnableAsyncCleanup = true;
UPROPERTY(EditAnywhere, Category = "Memory")
float CleanupInterval = 120.0f; // seconds
Add to your project’s .uproject file:
{
"Plugins": [
{
"Name": "Supabase",
"Enabled": true
}
]
}
[/Script/Supabase.SupabaseSettings]
bEnableAutoInit=true
DefaultTimeoutSeconds=30.0
bEnableDebugLogging=false
MaxRetryAttempts=3
[/Script/Supabase.SupabaseGameSettings]
bPersistentSessions=true
AutoSaveInterval=60.0
bEnableBatchProcessing=true
BatchSize=50
// Bind to connection state changes
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnConnectionStateChanged, bool, bIsConnected);
// Bind to authentication state changes
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnAuthenticationStateChanged, bool, bIsAuthenticated, const FUser&, User);
// Subscribe to subsystem events
USupabaseSubsystem* Subsystem = GetGameInstance()->GetSubsystem<USupabaseSubsystem>();
Subsystem->OnConnectionStateChanged.AddDynamic(this, &AMyActor::OnConnectionChanged);
Subsystem->OnAuthenticationStateChanged.AddDynamic(this, &AMyActor::OnAuthChanged);
// Check for common configuration issues
if (Connection->SupabaseServerUrl.IsEmpty())
{
UE_LOG(LogTemp, Error, TEXT("Server URL is empty"));
}
if (Connection->SupabaseCredentials.AnonymousKey.IsEmpty())
{
UE_LOG(LogTemp, Error, TEXT("Anonymous key is empty"));
}
// Enable detailed logging for troubleshooting
UPROPERTY(EditAnywhere, Category = "Debug")
bool bDebugLogging = true;
UPROPERTY(EditAnywhere, Category = "Debug")
bool bVerboseLogging = false;
For additional support, join our Discord community or check the troubleshooting guide.