API Reference of GS2-Formation SDK for Game Engine
Model
EzFormModel
Form Model
This entity represents the form status.
You can define slots as areas that can be formed.
For weapons and armor, parts such as “right hand”, “left hand”, “body”, and “arm” can be used as slots, and for parties, positions such as “vanguard”, “midfield”, and “rear guard” can be expressed as slots.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Form model name | ||
| metadata | string | ~ 2048 chars | Metadata | |||
| slots | List<EzSlotModel> | ✓ | 1 ~ 10 items | List of Slot Model |
EzMoldModel
Area for storing forms
If it is a party composition, it is intended to be saved in the form of “fire attribute party” or “water attribute party”. The number of areas that can be saved can be limited or expanded individually.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Form storage area model name | ||
| metadata | string | ~ 2048 chars | Metadata | |||
| formModel | EzFormModel | ✓ | ||||
| initialMaxCapacity | int | ✓ | 1 ~ 2147483646 | Initial capacity to store forms | ||
| maxCapacity | int | ✓ | 1 ~ 2147483646 | Maximum capacity to store forms |
EzPropertyFormModel
Property Form Model
An entity that represents the composition status. The difference between Mold / Form is that Mold / Form defines the number of slots and records the composition in each slot, and Property Form is used to represent compositions that are difficult to determine the number of slots in advance, such as setting skills for owned equipment.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Property form model name | ||
| metadata | string | ~ 2048 chars | Metadata | |||
| slots | List<EzSlotModel> | ✓ | 1 ~ 10 items | List of Slot Model |
EzMold
Form storage area
An entity that holds information organized by the game player. Each Mold can hold multiple Forms, and the capacity of how many Forms can be held can be set individually for each Mold.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Form storage area model name | ||
| userId | string | ✓ | ~ 128 chars | User Id | ||
| capacity | int | ✓ | 0 ~ 2147483646 | Current Capacity |
EzForm
Form
An entity representing formation status. Slots can be defined as areas that can be formed.
For weapons and armor, slots can be represented as parts like “right hand”, “left hand”, “torso”, and “arms”. For parties, slots can be represented as positions like “front line”, “mid-line”, and “back line”.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Name of the form | ||
| index | int | ✓ | 0 ~ 2147483646 | Index of form | ||
| slots | List<EzSlot> | 0 ~ 10 items | List of Slots |
EzPropertyForm
Property Form
An entity that represents the composition status. The difference between Mold / Form is that Mold / Form defines the number of slots and records the composition in each slot, and Property Form is used to represent compositions that are difficult to determine the number of slots in advance, such as setting skills for owned equipment.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Property form name | ||
| propertyId | string | ✓ | ~ 1024 chars | Property Id | ||
| slots | List<EzSlot> | 0 ~ 10 items | List of Slots |
EzSlot
Slot
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Slot model name | ||
| propertyId | string | ~ 1024 chars | Property ID | |||
| metadata | string | ~ 1024 chars | Metadata |
EzSlotModel
Slot Model
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Slot model name | ||
| propertyRegex | string | ✓ | “.*” | ~ 512 chars | Regular expressions for values that can be set as properties | |
| metadata | string | ~ 512 chars | Metadata |
EzSlotWithSignature
Signature Slot
| Type | Condition | Required | Default | Value Limits | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Slot model name | ||||||||||
| propertyType | String Enum enum { “gs2_inventory”, “gs2_simple_inventory”, “gs2_dictionary” } | ✓ | ~ 128 chars | Property Type
| ||||||||||
| body | string | ~ 1048576 chars | payload | |||||||||||
| signature | string | ~ 1024 chars | Signature that proves ownership of the resource for the property ID | |||||||||||
| metadata | string | ~ 1024 chars | Metadata |
EzConfig
Configuration
Set values to be applied to transaction variables
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| key | string | ✓ | ~ 64 chars | Name | ||
| value | string | ~ 51200 chars | Value |
EzAcquireAction
Acquire Action
EzVerifyActionResult
Verify action execution result
EzConsumeActionResult
Consume action execution result
EzAcquireActionResult
Acquire action execution result
EzTransactionResult
Transaction execution results
Transaction execution results executed using server-side transaction auto-execution functionality
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| transactionId | string | ✓ | 36 ~ 36 chars | Transaction ID | ||
| verifyResults | List<EzVerifyActionResult> | 0 ~ 10 items | List of verify action execution results | |||
| consumeResults | List<EzConsumeActionResult> | [] | 0 ~ 10 items | List of consume action execution results | ||
| acquireResults | List<EzAcquireActionResult> | [] | 0 ~ 100 items | List of acquire action execution results |
Methods
getMoldModel
Get mold model information
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| moldModelName | string | ✓ | ~ 128 chars | Form storage area model name |
Result
| Type | Description | |
|---|---|---|
| item | EzMoldModel | Form storage area |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
);
var item = await domain.ModelAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->MoldModel(
"mold-0001" // moldModelName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->MoldModel(
"mold-0001" // moldModelName
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Formation::Model::FMoldModel> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listMoldModels
Get list of mold model information
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name |
Result
| Type | Description | |
|---|---|---|
| items | List<EzMoldModel> | List of Form storage area |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
var items = await domain.MoldModelsAsync(
).ToListAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
var it = domain.MoldModels(
);
List<EzMoldModel> items = new List<EzMoldModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
);
const auto It = Domain->MoldModels(
);
TArray<Gs2::UE5::Formation::Model::FEzMoldModelPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
// Start event handling
var callbackId = domain.SubscribeMoldModels(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeMoldModels(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
var it = domain.MoldModels(
);
List<EzMoldModel> items = new List<EzMoldModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
);
// Start event handling
const auto CallbackId = Domain->SubscribeMoldModels(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeMoldModels(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getMold
Get form storage information by specifying form storage area and `property ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| moldModelName | string | ✓ | ~ 128 chars | Form storage area model name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token |
Result
| Type | Description | |
|---|---|---|
| item | EzMold | Form storage area |
| moldModel | EzMoldModel | Form storage area |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
var item = await domain.ModelAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Mold(
"mold-0001" // moldModelName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Mold(
"mold-0001" // moldModelName
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Formation::Model::FMold> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listMolds
Get list of form storage area information
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
| Type | Description | |
|---|---|---|
| items | List<EzMold> | List of form storage area |
| nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.MoldsAsync(
).ToListAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.Molds(
);
List<EzMold> items = new List<EzMold>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->Molds(
);
TArray<Gs2::UE5::Formation::Model::FEzMoldPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
// Start event handling
var callbackId = domain.SubscribeMolds(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeMolds(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.Molds(
);
List<EzMold> items = new List<EzMold>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
// Start event handling
const auto CallbackId = Domain->SubscribeMolds(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeMolds(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getFormModel
Get form model information
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| moldModelName | string | ✓ | ~ 128 chars | Form storage area model name |
Result
| Type | Description | |
|---|---|---|
| item | EzFormModel | Form |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
).FormModel(
);
var item = await domain.ModelAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
).FormModel(
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->MoldModel(
"mold-0001" // moldModelName
)->FormModel(
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
).FormModel(
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).MoldModel(
moldModelName: "mold-0001"
).FormModel(
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->MoldModel(
"mold-0001" // moldModelName
)->FormModel(
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Formation::Model::FFormModel> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
deleteForm
Delete Form
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| moldModelName | string | ✓ | ~ 128 chars | Form storage area model name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| index | int | ✓ | 0 ~ 2147483646 | Index of form |
Result
| Type | Description | |
|---|---|---|
| item | EzForm | Form |
| mold | EzMold | Form storage area |
| moldModel | EzMoldModel | Form storage area model |
| formModel | EzFormModel | Form Model |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var result = await domain.DeleteFormAsync(
); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var future = domain.DeleteFormFuture(
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Mold(
"mold-0001" // moldModelName
)->Form(
0 // index
);
const auto Future = Domain->DeleteForm(
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
const auto Result = Future->GetTask().Result();getForm
Get Form
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| moldModelName | string | ✓ | ~ 128 chars | Form storage area model name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| index | int | ✓ | 0 ~ 2147483646 | Index of form |
Result
| Type | Description | |
|---|---|---|
| item | EzForm | Form |
| mold | EzMold | Form storage area |
| moldModel | EzMoldModel | Form storage area model |
| formModel | EzFormModel | Form Model |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var item = await domain.ModelAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Mold(
"mold-0001" // moldModelName
)->Form(
0 // index
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Mold(
"mold-0001" // moldModelName
)->Form(
0 // index
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Formation::Model::FForm> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getFormWithSignature
Get form with signature
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| moldModelName | string | ✓ | ~ 128 chars | Form storage area model name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| index | int | ✓ | 0 ~ 2147483646 | Index of form | ||
| keyId | string | ✓ | “grn:gs2:{region}:{ownerId}:key:default:key:default” | ~ 1024 chars | encryption key GRN |
Result
| Type | Description | |
|---|---|---|
| item | EzForm | Form |
| body | string | Value to be signed |
| signature | string | Signature |
| mold | EzMold | Form storage area |
| moldModel | EzMoldModel | Form storage area model |
| formModel | EzFormModel | Form Model |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var result = await domain.GetFormWithSignatureAsync(
keyId: "key-0001"
);
var item = await result.ModelAsync();
var body = result.Body;
var signature = result.Signature; var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var future = domain.GetFormWithSignatureFuture(
keyId: "key-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.ModelFuture();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
var body = future.Result.Body;
var signature = future.Result.Signature; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Mold(
"mold-0001" // moldModelName
)->Form(
0 // index
);
const auto Future = Domain->GetFormWithSignature(
"key-0001" // keyId
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();
const auto Body = Result->Body;
const auto Signature = Result->Signature;listForms
Get list of forms
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| moldModelName | string | ✓ | ~ 128 chars | Mold Model Name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
| Type | Description | |
|---|---|---|
| items | List<EzForm> | List of Form |
| nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
var items = await domain.FormsAsync(
).ToListAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
var it = domain.Forms(
);
List<EzForm> items = new List<EzForm>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Mold(
"mold-0001" // moldModelName
);
const auto It = Domain->Forms(
);
TArray<Gs2::UE5::Formation::Model::FEzFormPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
// Start event handling
var callbackId = domain.SubscribeForms(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeForms(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
);
var it = domain.Forms(
);
List<EzForm> items = new List<EzForm>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Mold(
"mold-0001" // moldModelName
);
// Start event handling
const auto CallbackId = Domain->SubscribeForms(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeForms(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
setForm
Update Form
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| moldModelName | string | ✓ | ~ 128 chars | Form storage area model name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| index | int | ✓ | 0 ~ 2147483646 | Index of form | ||
| slots | List<EzSlotWithSignature> | ✓ | 1 ~ 10 items | List of Slot | ||
| keyId | string | ✓ | “grn:gs2:{region}:{ownerId}:key:default:key:default” | ~ 1024 chars | encryption key GRN |
Result
| Type | Description | |
|---|---|---|
| item | EzForm | Form |
| mold | EzMold | Form storage area |
| moldModel | EzMoldModel | Form storage area model |
| formModel | EzFormModel | Form Model |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var result = await domain.SetFormAsync(
slots: new List<Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature> {
new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature() {
Name = "slot-0001",
PropertyType = "gs2_dictionary",
Body = "body",
Signature = "signature",
},
},
keyId: "key-0001"
);
var item = await result.ModelAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).Mold(
moldModelName: "mold-0001"
).Form(
index: 0
);
var future = domain.SetFormFuture(
slots: new List<Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature> {
new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature() {
Name = "slot-0001",
PropertyType = "gs2_dictionary",
Body = "body",
Signature = "signature",
},
},
keyId: "key-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.ModelFuture();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->Mold(
"mold-0001" // moldModelName
)->Form(
0 // index
);
const auto Future = Domain->SetForm(
[]
{
auto v = MakeShared<TArray<TSharedPtr<Gs2::UE5::Formation::Model::FEzSlotWithSignature>>>();
v->Add(
MakeShared<Gs2::UE5::Formation::Model::FEzSlotWithSignature>()
->WithName(TOptional<FString>("slot-0001"))
->WithPropertyType(TOptional<FString>("gs2_dictionary"))
->WithBody(TOptional<FString>("body"))
->WithSignature(TOptional<FString>("signature"))
);
return v;
}(), // slots
"key-0001" // keyId
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();getPropertyFormModel
Get property form model information
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| propertyFormModelName | string | ✓ | ~ 128 chars | Property form model name |
Result
| Type | Description | |
|---|---|---|
| item | EzPropertyFormModel | Property form |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).PropertyFormModel(
propertyFormModelName: "form-0001"
);
var item = await domain.ModelAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).PropertyFormModel(
propertyFormModelName: "form-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->PropertyFormModel(
"form-0001" // propertyFormModelName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).PropertyFormModel(
propertyFormModelName: "form-0001"
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).PropertyFormModel(
propertyFormModelName: "form-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->PropertyFormModel(
"form-0001" // propertyFormModelName
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Formation::Model::FPropertyFormModel> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listPropertyFormModels
Get list of property form model information
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name |
Result
| Type | Description | |
|---|---|---|
| items | List<EzPropertyFormModel> | List of property form model name |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
var items = await domain.PropertyFormModelsAsync(
).ToListAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
var it = domain.PropertyFormModels(
);
List<EzPropertyFormModel> items = new List<EzPropertyFormModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
);
const auto It = Domain->PropertyFormModels(
);
TArray<Gs2::UE5::Formation::Model::FEzPropertyFormModelPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
// Start event handling
var callbackId = domain.SubscribePropertyFormModels(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribePropertyFormModels(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
);
var it = domain.PropertyFormModels(
);
List<EzPropertyFormModel> items = new List<EzPropertyFormModel>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
);
// Start event handling
const auto CallbackId = Domain->SubscribePropertyFormModels(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribePropertyFormModels(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
deletePropertyForm
Delete Property Form
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| propertyId | string | ✓ | ~ 1024 chars | Property Id |
Result
| Type | Description | |
|---|---|---|
| item | EzPropertyForm | Property Form |
| propertyFormModel | EzPropertyFormModel | Property Form Model |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var result = await domain.DeletePropertyFormAsync(
); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var future = domain.DeletePropertyFormFuture(
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->PropertyForm(
"form-0001", // propertyFormModelName
"property-0001" // propertyId
);
const auto Future = Domain->DeletePropertyForm(
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
const auto Result = Future->GetTask().Result();getPropertyForm
Get Property Form
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| propertyFormModelName | string | ✓ | ~ 128 chars | Property form model namee | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| propertyId | string | ✓ | ~ 1024 chars | Property Id |
Result
| Type | Description | |
|---|---|---|
| item | EzPropertyForm | PropertyForm |
| propertyFormModel | EzPropertyFormModel | Form Model |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var item = await domain.ModelAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->PropertyForm(
"form-0001", // propertyFormModelName
"property-0001" // propertyId
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
// Start event handling
var callbackId = domain.Subscribe(
value => {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
domain.Unsubscribe(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->PropertyForm(
"form-0001", // propertyFormModelName
"property-0001" // propertyId
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Formation::Model::FPropertyForm> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getPropertyFormWithSignature
Get property form with signature
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| propertyFormModelName | string | ✓ | ~ 128 chars | Property form model name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| propertyId | string | ✓ | ~ 1024 chars | Property Id | ||
| keyId | string | ✓ | “grn:gs2:{region}:{ownerId}:key:default:key:default” | ~ 1024 chars | encryption key GRN |
Result
| Type | Description | |
|---|---|---|
| item | EzPropertyForm | Property Form |
| body | string | Value to be signed |
| signature | string | Signature |
| propertyFormModel | EzPropertyFormModel | Property Form Model |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var result = await domain.GetPropertyFormWithSignatureAsync(
keyId: "key-0001"
);
var item = await result.ModelAsync();
var body = result.Body;
var signature = result.Signature; var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var future = domain.GetPropertyFormWithSignatureFuture(
keyId: "key-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.ModelFuture();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result;
var body = future.Result.Body;
var signature = future.Result.Signature; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->PropertyForm(
"form-0001", // propertyFormModelName
"property-0001" // propertyId
);
const auto Future = Domain->GetPropertyFormWithSignature(
"key-0001" // keyId
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();
const auto Body = Result->Body;
const auto Signature = Result->Signature;listPropertyForms
Get list of property forms
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| propertyFormModelName | string | ✓ | ~ 128 chars | Property form model name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
| Type | Description | |
|---|---|---|
| items | List<EzPropertyForm> | List of PropertyForm |
| nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.PropertyFormsAsync(
propertyFormModelName: "form-0001"
).ToListAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.PropertyForms(
propertyFormModelName: "form-0001"
);
List<EzPropertyForm> items = new List<EzPropertyForm>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->PropertyForms(
"form-0001" // propertyFormModelName
);
TArray<Gs2::UE5::Formation::Model::FEzPropertyFormPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}Value change event handling
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
// Start event handling
var callbackId = domain.SubscribePropertyForms(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribePropertyForms(callbackId); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.PropertyForms(
propertyFormModelName: "form-0001"
);
List<EzPropertyForm> items = new List<EzPropertyForm>();
while (it.HasNext())
{
yield return it.Next();
if (it.Error != null)
{
onError.Invoke(it.Error, null);
break;
}
if (it.Current != null)
{
items.Add(it.Current);
}
else
{
break;
}
} const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
// Start event handling
const auto CallbackId = Domain->SubscribePropertyForms(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribePropertyForms(CallbackId);Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
setPropertyForm
Update Property Form
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name | ||
| propertyFormModelName | string | ✓ | ~ 128 chars | Property form model name | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| propertyId | string | ✓ | ~ 1024 chars | Property Id | ||
| slots | List<EzSlotWithSignature> | ✓ | 1 ~ 10 items | List of Slot | ||
| keyId | string | ✓ | “grn:gs2:{region}:{ownerId}:key:default:key:default” | ~ 1024 chars | encryption key GRN |
Result
| Type | Description | |
|---|---|---|
| item | EzPropertyForm | Property Form |
| proeprtyFormModel | EzPropertyFormModel | Property Form Model |
Implementation Example
var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var result = await domain.SetPropertyFormAsync(
slots: new List<Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature> {
new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature() {
Name = "slot-0001",
PropertyType = "gs2_dictionary",
Body = "body",
Signature = "signature",
},
},
keyId: "key-0001"
);
var item = await result.ModelAsync(); var domain = gs2.Formation.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).PropertyForm(
propertyFormModelName: "form-0001",
propertyId: "property-0001"
);
var future = domain.SetPropertyFormFuture(
slots: new List<Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature> {
new Gs2.Unity.Gs2Formation.Model.EzSlotWithSignature() {
Name = "slot-0001",
PropertyType = "gs2_dictionary",
Body = "body",
Signature = "signature",
},
},
keyId: "key-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
var future2 = future.Result.ModelFuture();
yield return future2;
if (future2.Error != null)
{
onError.Invoke(future2.Error, null);
yield break;
}
var result = future2.Result; const auto Domain = Gs2->Formation->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->PropertyForm(
"form-0001", // propertyFormModelName
"property-0001" // propertyId
);
const auto Future = Domain->SetPropertyForm(
[]
{
auto v = MakeShared<TArray<TSharedPtr<Gs2::UE5::Formation::Model::FEzSlotWithSignature>>>();
v->Add(
MakeShared<Gs2::UE5::Formation::Model::FEzSlotWithSignature>()
->WithName(TOptional<FString>("slot-0001"))
->WithPropertyType(TOptional<FString>("gs2_dictionary"))
->WithBody(TOptional<FString>("body"))
->WithSignature(TOptional<FString>("signature"))
);
return v;
}(), // slots
"key-0001" // keyId
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
// obtain changed values / result values
const auto Future2 = Future->GetTask().Result()->Model();
Future2->StartSynchronousTask();
if (Future2->GetTask().IsError())
{
return Future2->GetTask().Error();
}
const auto Result = Future2->GetTask().Result();