NAV
Unity Unreal Engine 4

GS2-Mission

GS2-SDK for Game Engine のリファレンス

ゲームエンジン向けモデル

EzComplete

ミッションの達成状況を記録したエンティティです。

説明
missionGroupName string ミッショングループ名
completedMissionTaskNames string[] 達成済みのタスク名リスト
receivedMissionTaskNames string[] 報酬の受け取り済みのタスク名リスト

EzCounterScopeModel

説明
resetType string リセットタイミング
resetDayOfMonth int リセットをする日にち
resetDayOfWeek string リセットする曜日
resetHour int リセット時刻

EzConfig

説明
key string 名前
value string

EzAcquireAction

説明
action string スタンプシートで実行するアクションの種類
request string 消費リクエストのJSON

EzCounter

カウンターはミッションの進行状況をゲームプレイヤー毎に保持するエンティティです。 カウンターの値は関連付けられたタスクの期間ごとに集計されます。

そのため、1つのカウンターは複数の値を持ちます。 例えば、クエストのクリア回数カウンターであれば、今月のクリア回数、今週のクリア回数、今日のクリア回数。といった具合です。

説明
name string カウンター名
values ScopedValue[]

EzCounterModel

カウンターマスターはミッションタスクの達成条件に設定可能なエンティティです。 カウンターの値は複数のミッショングループから参照可能なため、1つのカウンターでウィークリーミッションとデイリーミッションといった複数のミッショングループの達成条件に設定ができます。

説明
name string カウンター名
metadata string メタデータ
scopes CounterScopeModel[] カウンターのリセットタイミング
challengePeriodEventId string カウンターの操作が可能な期間を設定した GS2-Schedule イベントGRN

EzMissionGroupModel

ミッショングループはカウンターのリセットタイミングでタスクをグルーピングするエンティティです。 たとえば、デイリーミッションで1つのグループ。ウィークリーミッションで1つのグループとなります。

説明
name string グループ名
metadata string メタデータ
tasks MissionTaskModel[] タスクリスト
resetType string リセットタイミング
resetDayOfMonth int リセットをする日にち
resetDayOfWeek string リセットする曜日
resetHour int リセット時刻
completeNotificationNamespaceId string ネームスペースGRN

EzMissionTaskModel

説明
name string タスク名
metadata string メタデータ
counterName string カウンター名
targetValue long 目標値
completeAcquireActions AcquireAction[] ミッション達成時の報酬
challengePeriodEventId string 報酬が受け取り可能な期間を設定した GS2-Schedule イベントGRN
premiseMissionTaskName string このタスクに挑戦するために達成しておく必要のあるタスクの名前

EzScopedValue

説明
resetType string リセットタイミング
value long カウント

ゲームエンジン向けメソッド

getComplete

getComplete

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzGetCompleteResult> asyncResult = null;
    var current = gs2.Mission.GetComplete(
        callback: r => { asyncResult = r; },
        session: session,
        namespaceName: "namespace1",
        missionGroupName: "mission-group-0001"
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var item = result.Item;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.getComplete(
    [](gs2::ez::account::AsyncEzGetCompleteResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.getComplete failed.");
        }
        else
        {
            Item = r.getResult()->getItem();
        }
    },
    ProfilePtr->getGs2Session(),
    TCHAR_TO_ANSI("namespace1"), // namespaceName
    TCHAR_TO_ANSI("mission-group-0001") // missionGroupName
);

ミッショングループを指定して達成したミッションを取得

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
missionGroupName string ~ 128文字 ミッショングループ名
accessToken string ~ 128文字 ユーザーID

Result

説明
item EzComplete 達成状況

listCompletes

listCompletes

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzDescribeCompletesResult> asyncResult = null;
    var current = gs2.Mission.DescribeCompletes(
        callback: r => { asyncResult = r; },
        session: session,
        namespaceName: "namespace1",
        limit: null,
        pageToken: null
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var items = result.Items;
    var nextPageToken = result.NextPageToken;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.describeCompletes(
    [](gs2::ez::account::AsyncEzDescribeCompletesResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.describeCompletes failed.");
        }
        else
        {
            Items = r.getResult()->getItems();
            NextPageToken = r.getResult()->getNextPageToken();
        }
    },
    ProfilePtr->getGs2Session(),
    TCHAR_TO_ANSI("namespace1"), // namespaceName
    null // limit,
    TCHAR_TO_ANSI(null) // pageToken
);

達成したミッションの一覧を取得

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
accessToken string ~ 128文字 ユーザーID
pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン
limit int 30 1 ~ 1000 データの取得件数

Result

説明
items EzComplete[] 達成状況のリスト
nextPageToken string リストの続きを取得するためのページトークン

receiveRewards

receiveRewards

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzCompleteResult> asyncResult = null;
    var current = gs2.Mission.Complete(
        callback: r => { asyncResult = r; },
        session: session,
        namespaceName: "namespace1",
        missionGroupName: "mission-group-0001",
        missionTaskName: "mission-task-0001"
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var stampSheet = result.StampSheet;
    var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.complete(
    [](gs2::ez::account::AsyncEzCompleteResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.complete failed.");
        }
        else
        {
            StampSheet = r.getResult()->getStampSheet();
            StampSheetEncryptionKeyId = r.getResult()->getStampSheetEncryptionKeyId();
        }
    },
    ProfilePtr->getGs2Session(),
    TCHAR_TO_ANSI("namespace1"), // namespaceName
    TCHAR_TO_ANSI("mission-group-0001"), // missionGroupName
    TCHAR_TO_ANSI("mission-task-0001") // missionTaskName
);

ミッションの達成報酬を取得

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
missionGroupName string ~ 128文字 ミッショングループ名
missionTaskName string ~ 128文字 タスク名
accessToken string ~ 128文字 ユーザーID

Result

説明
stampSheet string ミッションの達成報酬を受領するスタンプシート
stampSheetEncryptionKeyId string スタンプシートの署名計算に使用した暗号鍵GRN

getCounter

getCounter

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzGetCounterResult> asyncResult = null;
    var current = gs2.Mission.GetCounter(
        callback: r => { asyncResult = r; },
        session: session,
        namespaceName: "namespace1",
        counterName: "quest_complete"
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var item = result.Item;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.getCounter(
    [](gs2::ez::account::AsyncEzGetCounterResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.getCounter failed.");
        }
        else
        {
            Item = r.getResult()->getItem();
        }
    },
    ProfilePtr->getGs2Session(),
    TCHAR_TO_ANSI("namespace1"), // namespaceName
    TCHAR_TO_ANSI("quest_complete") // counterName
);

ミッショングループを指定して達成したミッションを取得

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
accessToken string ~ 128文字 ユーザーID
counterName string ~ 128文字 カウンター名

Result

説明
item EzCounter カウンター

listCounters

listCounters

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzDescribeCountersResult> asyncResult = null;
    var current = gs2.Mission.DescribeCounters(
        callback: r => { asyncResult = r; },
        session: session,
        namespaceName: "namespace1",
        limit: null,
        pageToken: null
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var items = result.Items;
    var nextPageToken = result.NextPageToken;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.describeCounters(
    [](gs2::ez::account::AsyncEzDescribeCountersResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.describeCounters failed.");
        }
        else
        {
            Items = r.getResult()->getItems();
            NextPageToken = r.getResult()->getNextPageToken();
        }
    },
    ProfilePtr->getGs2Session(),
    TCHAR_TO_ANSI("namespace1"), // namespaceName
    null // limit,
    TCHAR_TO_ANSI(null) // pageToken
);

達成したミッションの一覧を取得

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
accessToken string ~ 128文字 ユーザーID
pageToken string ~ 1024文字 データの取得を開始する位置を指定するトークン
limit int 30 1 ~ 1000 データの取得件数

Result

説明
items EzCounter[] カウンターのリスト
nextPageToken string リストの続きを取得するためのページトークン

getCounterModel

getCounterModel

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzGetCounterModelResult> asyncResult = null;
    var current = gs2.Mission.GetCounterModel(
        callback: r => { asyncResult = r; },
        namespaceName: "namespace1",
        counterName: "counter-0001"
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var item = result.Item;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.getCounterModel(
    [](gs2::ez::account::AsyncEzGetCounterModelResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.getCounterModel failed.");
        }
        else
        {
            Item = r.getResult()->getItem();
        }
    },
    TCHAR_TO_ANSI("namespace1"), // namespaceName
    TCHAR_TO_ANSI("counter-0001") // counterName
);

カウンターの種類を認証

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
counterName string ~ 128文字 カウンター名

Result

説明
item EzCounterModel カウンターの種類

listCounterModels

listCounterModels

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzDescribeCounterModelsResult> asyncResult = null;
    var current = gs2.Mission.DescribeCounterModels(
        callback: r => { asyncResult = r; },
        namespaceName: "namespace1"
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var items = result.Items;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.describeCounterModels(
    [](gs2::ez::account::AsyncEzDescribeCounterModelsResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.describeCounterModels failed.");
        }
        else
        {
            Items = r.getResult()->getItems();
        }
    },
    TCHAR_TO_ANSI("namespace1") // namespaceName
);

カウンターの種類を認証

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名

Result

説明
items EzCounterModel[] カウンターの種類のリスト

getMissionGroupModel

getMissionGroupModel

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzGetMissionGroupModelResult> asyncResult = null;
    var current = gs2.Mission.GetMissionGroupModel(
        callback: r => { asyncResult = r; },
        namespaceName: "namespace1",
        missionGroupName: "mission-group-0001"
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var item = result.Item;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.getMissionGroupModel(
    [](gs2::ez::account::AsyncEzGetMissionGroupModelResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.getMissionGroupModel failed.");
        }
        else
        {
            Item = r.getResult()->getItem();
        }
    },
    TCHAR_TO_ANSI("namespace1"), // namespaceName
    TCHAR_TO_ANSI("mission-group-0001") // missionGroupName
);

ミッショングループ名を指定してミッショングループモデルを取得

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
missionGroupName string ~ 128文字 グループ名

Result

説明
item EzMissionGroupModel ミッショングループ

listMissionGroupModels

listMissionGroupModels

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzDescribeMissionGroupModelsResult> asyncResult = null;
    var current = gs2.Mission.DescribeMissionGroupModels(
        callback: r => { asyncResult = r; },
        namespaceName: "namespace1"
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var items = result.Items;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.describeMissionGroupModels(
    [](gs2::ez::account::AsyncEzDescribeMissionGroupModelsResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.describeMissionGroupModels failed.");
        }
        else
        {
            Items = r.getResult()->getItems();
        }
    },
    TCHAR_TO_ANSI("namespace1") // namespaceName
);

ミッショングループモデルの一覧を取得

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名

Result

説明
items EzMissionGroupModel[] ミッショングループのリスト

getMissionTaskModel

getMissionTaskModel

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzGetMissionTaskModelResult> asyncResult = null;
    var current = gs2.Mission.GetMissionTaskModel(
        callback: r => { asyncResult = r; },
        namespaceName: "namespace1",
        missionGroupName: "mission-group-0001",
        missionTaskName: "mission-task-0001"
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var item = result.Item;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.getMissionTaskModel(
    [](gs2::ez::account::AsyncEzGetMissionTaskModelResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.getMissionTaskModel failed.");
        }
        else
        {
            Item = r.getResult()->getItem();
        }
    },
    TCHAR_TO_ANSI("namespace1"), // namespaceName
    TCHAR_TO_ANSI("mission-group-0001"), // missionGroupName
    TCHAR_TO_ANSI("mission-task-0001") // missionTaskName
);

ミッションタスク名を指定してミッションタスクモデルを取得

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
missionGroupName string ~ 128文字 グループ名
missionTaskName string ~ 128文字 タスク名

Result

説明
item EzMissionTaskModel ミッションタスク

listMissionTaskModels

listMissionTaskModels

using Gs2.Core.AsyncResult;
using Gs2.Gs2Account.Unity.Result;
using Gs2.Unity.Util;

var profile = new Profile(
    clientId: "your client id",
    clientSecret: "your client secret",
    reopener: new Gs2BasicReopener()
);

{
    AsyncResult<object> asyncResult = null;

    var current = profile.Initialize(
        r => { asyncResult = r; }
    );

    yield return current;

    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }
}

// Up to this line is the initialization process.

var gs2 = new Gs2.Unity.Client(profile);

{
    AsyncResult<EzDescribeMissionTaskModelsResult> asyncResult = null;
    var current = gs2.Mission.DescribeMissionTaskModels(
        callback: r => { asyncResult = r; },
        namespaceName: "namespace1",
        missionGroupName: "mission-group-0001"
    );

    yield return current;
    if (asyncResult.Error != null)
    {
        OnError(asyncResult.Error);
        yield break;
    }

    var result = asyncResult.Result;
    var items = result.Items;
}
ProfilePtr = std::make_shared<gs2::ez::Profile>(
    TCHAR_TO_ANSI(*ClientId),
    TCHAR_TO_ANSI(*ClientSecret),
    gs2::ez::Gs2BasicReopener()
);

ClientPtr = std::make_shared<gs2::ez::Client>(
    *ProfilePtr
);

ProfilePtr->initialize(
    [this](gs2::ez::Profile::AsyncInitializeResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "profile.initialize failed.");
        }
        else
        {
            AccountCreate();
        }
    }
);

// Up to this line is the initialization process.

ClientPtr->mission.describeMissionTaskModels(
    [](gs2::ez::account::AsyncEzDescribeMissionTaskModelsResult r)
    {
        if (r.getError())
        {
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "mission.describeMissionTaskModels failed.");
        }
        else
        {
            Items = r.getResult()->getItems();
        }
    },
    TCHAR_TO_ANSI("namespace1"), // namespaceName
    TCHAR_TO_ANSI("mission-group-0001") // missionGroupName
);

ミッションタスクモデルの一覧を取得

Request

必須 デフォルト 値の制限 説明
namespaceName string ~ 32文字 ネームスペース名
missionGroupName string ~ 128文字 グループ名

Result

説明
items EzMissionTaskModel[] ミッションタスクのリスト