Table of Contents

Interface IConfigKeySessionShare

Namespace
MonkeyLoader.Resonite.Configuration
Assembly
MonkeyLoader.Resonite.Integration.dll

Defines the untyped interface for config key components, which make the key's local value available as a shared resource in Resonite sessions, and optionally allow writing back changes from the session to the config item.

public interface IConfigKeySessionShare

Properties

AllowWriteBack

Gets or sets whether to allow writing back changes from the session to the config item.

bool AllowWriteBack { get; set; }

Property Value

bool

ConfigKey

Gets the shared config item.

IDefiningConfigKey ConfigKey { get; }

Property Value

IDefiningConfigKey

DefaultValue

Gets or sets the default value for the shared config item for users that don't have it themselves.

object? DefaultValue { get; set; }

Property Value

object

KeyType

Gets the Type of the shared config item's value.

Type KeyType { get; }

Property Value

Type

SharedId

Gets the key used in FrooxEngine.Worlds to identify the FrooxEngine.ValueField<T> that stores the shared value.

string SharedId { get; }

Property Value

string

SharedType

Gets the Type of the shared value.

Type SharedType { get; }

Property Value

Type

VariableName

Gets the full name of the dynamic variable that is linked to the shared value.

string VariableName { get; }

Property Value

string

Methods

ConvertToKey(object?)

Converts the given value from the shared resource's type to the config item's.

object? ConvertToKey(object? sharedValue)

Parameters

sharedValue object

The value suitable for the shared resource to be converted.

Returns

object

The value converted to the config item's type.

Remarks

May throw when the provided input isn't compatible.

ConvertToShared(object?)

Converts the given value from the config item's type to the shared resource's.

object? ConvertToShared(object? keyValue)

Parameters

keyValue object

The value suitable for the config item to be converted.

Returns

object

The value converted to the shared resource's type.

Remarks

May throw when the provided input isn't compatible.

GetSharingUsers(World)

Gets a sequence of users who have defined overrides for the shared value.

IEnumerable<User> GetSharingUsers(World world)

Parameters

world World

The world to get the sharing users for.

Returns

IEnumerable<User>

The users who have defined overrides.

SetupOverride(World)

Ensures that the shared value field and overrides for this config item exist in the given FrooxEngine.World.

void SetupOverride(World world)

Parameters

world World

The world to set up the override for.

ShutdownOverride(World)

Removes the connection between this config item and the given FrooxEngine.World's shared value field.

void ShutdownOverride(World world)

Parameters

world World

The world to remove the connection from.