When you have the ID of the mission you want to start, you can use this function;
int missionID =0;LootLockerSDKManager.StartMission(missionID, (response) =>{if (response.success) {Debug.Log("Mission successfully started!"); }else {Debug.Log("Error, could not start mission:"+response.Error); }});
Finish a mission
To finish a mission, you must first start a mission, and then send the missionSignature as a parameter when ending the mission.
int missionID =0;string missionSignature = "eee411109a229046154bc9d75265a9ccb23a3a9c"; // Received when calling LootLockerSDKManager.StartMission()
string playerID ="1234";LootLockerFinishingPayload payload =newLootLockerFinishingPayload();payload.finish_time="10";LootLockerSDKManager.FinishMission(missionID, missionSignature, playerID, payload, (response) =>{if (response.success) {Debug.Log("Mission finished!"); }else {Debug.Log("Error, could not finish mission:"+response.Error); }});
Get information about all available missions;
LootLockerSDKManager.GetAllMissions((response) =>{if (response.success) {Debug.Log("Successfully received all missions:");for (int i =0; i <response.missions.Length; i++) {c#Debug.Log(response.missions[i].asset_id); } }else {Debug.Log("Error, could not fetch missions:"+response.Error); }});
Get information about a single mission
int missionID =0;LootLockerSDKManager.GetMission(missionID, (response) =>{if (response.success) {Debug.Log("Successfully received mission");Debug.Log(response.mission.difficulty_name); }else {Debug.Log("Error, could not fetch mission:"+response.Error); }});