FluxPlayerData

csharp
public sealed class FluxPlayerData

Namespace NodeWorld.SDK.Client.Flux.

The values a world keeps for the local player between visits (FL# PlayerData), on this client: one small JSON file per world and per NodeWorld account, under the client's persistent data folder. At most MaxEntries keys, MaxValueChars characters each. Written when a value changes.

Constants

MaxEntries

csharp
public const int MaxEntries = 256

The most keys a world keeps per player: 256.

MaxKeyChars

csharp
public const int MaxKeyChars = 128

The longest key: 128 characters.

MaxValueChars

csharp
public const int MaxValueChars = 4096

The longest value: 4 096 characters.

Constructors

FluxPlayerData

csharp
public FluxPlayerData(string worldId, string accountId)

The values of this world for this account, read from the file under Application.persistentDataPath/NodeWorld/WorldData (empty when there is none or it cannot be read).

Methods

TryGet

csharp
public bool TryGet(string key, Kind kind, out string value)

The value kept under key, as text: true when there is one of that kind.

Set

csharp
public void Set(string key, Kind kind, string value)

Keeps a value under key and writes the file; a key or a value too long, or one key too many, throws FluxScriptError.

Delete

csharp
public void Delete(string key)

Forgets key and writes the file.

Nested types