Skip to main content

ProjectVSettings class

The SDK settings asset. Create it with Assets > Create > SilverTiger > ProjectV SDK > Settings, pick the Environment and fill in its fields in the Inspector.

Namespace: SilverTiger.ProjectV.Unity

public sealed class ProjectVSettings : ScriptableObject, ISerializationCallbackReceiver

Properties​

PropertyTypeDescription
EnvironmentProjectVEnvironmentThe server environment this build connects to.
EndpointstringThe server address set for Environment, such as http://127.0.0.1:7350, with surrounding spaces removed.
ClientVersionstringThe game version sent to the server, in major.minor.patch form, such as 3.0.0.
StartupProjectVStartupSettingsWhich player data loads at startup. All of it is required.
TrustClientRewardsboolWhen true, the game sends the rewards it computed itself when a mission ends. Check this before sending them; the server uses them only when it is set up to trust the client too.
TrustClientStatsboolWhen true, the game takes character and ally stats from its own assets instead of the server. The SDK only exposes this setting; the game decides what to do with it.

Methods​

Validate()​

Checks the settings and throws on the first problem, so you can catch setup mistakes early. The SDK also runs this check when it starts.

public void Validate();

Exceptions

ExceptionWhen
InvalidOperationExceptionThe environment is unknown; its address or server key is missing; the address is not HTTP or HTTPS; Production does not use a non-local HTTPS address; the request timeout is not between 1 and 120 seconds; or a startup setting is turned off.
UriFormatExceptionThe address is not a valid absolute URL.
ArgumentExceptionThe client version or session key has an invalid format.

OnBeforeSerialize()​

Unity serialization callback; does nothing. Do not call it yourself.

public void OnBeforeSerialize();

OnAfterDeserialize()​

Unity serialization callback that fills in per-environment fields from older assets. Do not call it yourself.

public void OnAfterDeserialize();