EditorApiSettings
A class in Root.Township, the global namespace.
Global settings for how the editor talks to the web API: offline mode, which endpoint to use, and an optional credentials override file. Read through GlobalSettings<EditorApiSettings>.Instance.
- Listed in Global namespace: E to H
- Inherits or implements
GlobalSettings<EditorApiSettings> - Derived types
EditorApiSettings - Attributes
GlobalSettings,CreateAssetMenu
Constructors
| Member | What it is |
|---|---|
EditorApiSettings() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
8 private and internal fields
| Member | What it is |
|---|---|
private TextAsset credentialOverrideFile | Text asset holding the override credentials JSON. |
private string customEndpoint | Backing field for CustomEndpoint. |
private const string DefaultEditorOverrideCredentialsFilename | Default file name for the override credentials, MyEditorCredentials.json. |
private const string DefaultEditorOverrideCredentialsPath | Default asset folder for the override credentials file. |
private ApiEndpoint endpointInEditor | Backing field for EndpointInEditor. |
private bool isIgnoringInternetOffline | Backing field for IsIgnoringInternetOffline. |
private bool isOffline | Backing field for IsOffline. |
private bool isOverridingCredentialInEditor | Backing field for IsOverridingCredentialInEditor. |
Properties
| Member | What it is |
|---|---|
string CustomEndpoint { get; } | URL used when the editor endpoint is set to custom. |
ApiEndpoint EndpointInEditor { get; } | Which API endpoint the editor uses. |
bool IsIgnoringInternetOffline { get; } | Whether the editor ignores the internet being offline. |
bool IsOffline { get; } | Whether the editor runs without the API. |
static bool IsOverridingCredentialInEditor { get; } | True only in the editor when the override credentials option is on. |
Methods
| Member | What it is |
|---|---|
static EditorOverrideCredentials GetOverrideCredentials() | Parses the override credentials JSON file, throwing if there is none. |