2026-08-12 14:03:44 +03:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace RudderSdk.Unity
|
|
|
|
|
{
|
|
|
|
|
[CreateAssetMenu(menuName = "Rudder/Configuration", fileName = "RudderConfiguration")]
|
|
|
|
|
public class RudderConfiguration : ScriptableObject
|
|
|
|
|
{
|
|
|
|
|
[Tooltip("Project key issued in the Rudder admin panel. Required.")]
|
|
|
|
|
public string ProjectKey;
|
|
|
|
|
|
|
|
|
|
[Tooltip("API base URL, e.g. https://api.rudder.build.")]
|
2026-08-19 17:49:00 +03:00
|
|
|
public string BaseUrl = "https://api.rudder.build";
|
2026-08-12 14:03:44 +03:00
|
|
|
|
2026-08-19 17:49:00 +03:00
|
|
|
[Tooltip("Realtime websocket URL. The relay is not deployed yet; set this only once it is.")]
|
|
|
|
|
public string RealtimeUrl = "wss://api.rudder.build/api/realtime/ws";
|
2026-08-12 14:03:44 +03:00
|
|
|
|
|
|
|
|
[Tooltip("HTTP request timeout in seconds.")]
|
|
|
|
|
[Min(1)]
|
|
|
|
|
public int TimeoutSeconds = 10;
|
|
|
|
|
|
|
|
|
|
private void OnValidate()
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(ProjectKey))
|
|
|
|
|
{
|
|
|
|
|
Debug.LogWarning(
|
|
|
|
|
"[Rudder] ProjectKey is empty on " + name + ". The SDK cannot authenticate without it.",
|
|
|
|
|
this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|