Skip to content

Get Sansar

Script API

EntriesAttribute

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Class Namespace Sansar.Script Inherits Attribute

List of entries to populate IList or IDictionary properties with.

[System.AttributeUsage(System.AttributeTargets.Field)]
public class EntriesAttribute : Attribute

Remarks

When used with IDictionary the entries are the keys with no default values.

Members at a glance

KindMembers
ConstructorsEntriesAttribute
FieldsLocked

Constructors

EntriesAttribute

public EntriesAttribute(params object[] entries)

List of entries to populate IList or IDictionary properties with.

ParameterTypeDescription
entriesobject[]
Remarks

When used with IDictionary the entries are the keys with no default values.

When used with IList the entries are the default values.

To set an IList of a specific Count with no default values use MinEntriesAttribute

Has no effect on other parameter types.

For Vector, Quaternion, and Colors in IList their default values must be specified in string form.

Example
[Entries("King", "Queen", "Rook", "Bishop", "Knight", "Pawn")]
public IDictionary<string, ClusterResource> GamePieces;
[Entries("<1,2,3>", "<2.5,3.6,4.6>")]
public IList<Sansar.Vector> GamePieces;

Fields

Locked

public bool Locked

Locks the IDictionary or IList properties so entries can not be added or removed.

Generated from the Sansar 47.10.0 client ScriptApi snapshot.