A cross-platform achievement. Class has methods for unlocking, revealing and incrementing the achievement that will work for all supported platforms. Only intended to be used by CloudOnce internal classes.
More...
|
string | ID [get] |
| The ID for the current platform.
|
|
bool | IsUnlocked [get] |
| Whether or not this achievement has been unlocked.
|
|
double | Progress [get] |
| The current progress of this achievement, represented as a number between 0.0 and 100.0.
|
|
A cross-platform achievement. Class has methods for unlocking, revealing and incrementing the achievement that will work for all supported platforms. Only intended to be used by CloudOnce internal classes.
◆ UnifiedAchievement()
CloudOnce.Internal.UnifiedAchievement.UnifiedAchievement |
( |
string |
internalID, |
|
|
string |
platformID |
|
) |
| |
|
inline |
A cross-platform achievement. Class has methods for unlocking, revealing and incrementing the achievement that will work for all supported platforms.
- Parameters
-
internalID | The internal ID for this achievement. |
platformID | The current platform ID for this achievement. Set to string.Empty if platform is not supported. |
◆ Increment() [1/2]
void CloudOnce.Internal.UnifiedAchievement.Increment |
( |
double |
current, |
|
|
double |
goal, |
|
|
Action< CloudRequestResult< bool > > |
onComplete = null |
|
) |
| |
|
inline |
Increments this achievement.
Will calculate progress from current and goal .
Progress of 0.0 will reveal the achievement and 100.0 will unlock it.
- Parameters
-
current | Current progress of achievement. |
goal | Total amount of steps to unlock achievement. |
onComplete | Callback that will be called to report the result of the operation: true on success, false otherwise. If false , an error message will be included in the callback. |
◆ Increment() [2/2]
void CloudOnce.Internal.UnifiedAchievement.Increment |
( |
double |
progress, |
|
|
Action< CloudRequestResult< bool > > |
onComplete = null |
|
) |
| |
|
inline |
Increments this achievement.
Can also be used to reveal or unlock this achievement.
A progress of 0.0 will reveal the achievement and 100.0 will unlock it.
- Parameters
-
progress | The current progress of this achievement, represented as a number between 0.0 and 100.0. A progress of 0.0 will reveal the achievement and 100.0 will unlock it. |
This value is interpreted as the total percentage of the achievement's progress that the player should have as a result of this call (regardless of the progress they had before). So if the player's previous progress was 30% and this call specifies 50.0, the new progress will be 50% (not 80%).
- Parameters
-
onComplete | Callback that will be called to report the result of the operation: true on success, false otherwise. If false , an error message will be included in the callback. |
◆ Reveal()
void CloudOnce.Internal.UnifiedAchievement.Reveal |
( |
Action< CloudRequestResult< bool > > |
onComplete = null | ) |
|
|
inline |
Reveals this achievement.
- Parameters
-
onComplete | Callback that will be called to report the result of the operation: true on success, false otherwise. If false , an error message will be included in the callback. |
◆ Unlock()
void CloudOnce.Internal.UnifiedAchievement.Unlock |
( |
Action< CloudRequestResult< bool > > |
onComplete = null | ) |
|
|
inline |
Unlocks this achievement.
- Parameters
-
onComplete | Callback that will be called to report the result of the operation: true on success, false otherwise. If false , an error message will be included in the callback. |
◆ UpdateData()
void CloudOnce.Internal.UnifiedAchievement.UpdateData |
( |
bool |
isUnlocked, |
|
|
double |
progress, |
|
|
bool |
isHidden |
|
) |
| |
|
inline |
Updates locked status and progress with data received from native API.
Only intended to be used by internal CloudOnce systems.
- Parameters
-
isUnlocked | Whether or not this achievement has been unlocked. |
progress | The current progress of this achievement, represented as a number between 0.0 and 100.0. |
isHidden | Whether or not this achievement is hidden. |
The documentation for this class was generated from the following file:
- Assets/Extensions/CloudOnce/Internal/UnifiedAchievement.cs