Shared types
Screen recovery state​
ProjectVScreenRecoveryState (.Presentation.Recovery) is on every data
screen snapshot as Recovery:
| Member | Meaning |
|---|---|
Phase | ProjectVScreenPhase: Idle, Loading, Live, Empty, Partial, Cached, Stale, Offline, Error |
Message | Safe text describing the state |
HasUsableData | Keep rendering the current data |
CanRetry | Show a Retry button (calls the same refresh) |
CanSync | Show a Sync button (re-read the server after an unknown outcome) |
RetryAfterSeconds | Disable Retry for this long, when set |
Do not blank a screen that still has usable data because a refresh failed; show an offline or partial indicator instead.
Transaction confirmation​
Costly actions are confirmed before they run. A presenter that supports them
exposes a ProjectVTransactionConfirmationCoordinator (for example
IProjectVCharacterPresenter.Transactions):
| Member | Meaning |
|---|---|
Status | ProjectVTransactionStatus: Idle, AwaitingConfirmation, InFlight, Succeeded, Rejected, Cancelled, UnknownOutcome |
Current | ProjectVTransactionConfirmation: Kind, Title, ItemOrRewardSummary, PriceSummary, Balances, DataLossScope, ExpiresAtUnixSeconds, IsAffordable |
LastResult | ProjectVTransactionResult: Status, Message, CanRetry, CanSync |
IsBusy, CanConfirm, CanCancel | Button state |
Cancel() | Close the open confirmation |
Changed | Event raised on every change |
ProjectVBalancePreview (in Balances) shows ResourceId,
CurrentBalance, Cost and ProjectedBalance; these are a preview of
the confirmation, not new balances. ProjectVTransactionKind:
WalletPurchase, GachaDraw, AccountDeletion, CharacterSkillUpgrade,
CharacterEquipmentUpgrade.
Errors​
ProjectVBackendErrorCategory: Cancelled, Validation, Authentication,
Authorization, NotFound, Conflict, RateLimited, Timeout,
Unavailable, Network, Protocol, Server, Client.
Login-side errors (Startup, Authentication, Account, Lobby) expose
LocalizationKey in the form projectv.<screen>.<category>, for example
projectv.authentication.network. Data-screen errors (Character, Alliance,
Campaign, Shop) expose SafeMessage. Every error has Code and an optional
RequestId to show in a support panel.
Typed identifiers​
IDs are small readonly structs compared by value with .Equals:
ProjectVCharacterId, ProjectVCharacterSkillId, ProjectVCampaignMissionId,
ProjectVShopOfferId, ProjectVItemId, ProjectVResourceId,
ProjectVCurrencyId, ProjectVEquipmentId, ProjectVEquipmentSlotId,
ProjectVSkinId, ProjectVLoadoutSlotId, ProjectVBackpackSlotId,
ProjectVHeaderViewKey, ProjectVGameplayKey, ProjectVGameplaySkillId,
ProjectVGameplayItemId. Each has a Value string.
Well-known values: ProjectVLoadoutSlots.Main / .ActiveAlly,
ProjectVCharacterKinds.Character / .Ally, and ProjectVHeaderViewKeys
(Credit, Gold, CoreDust, Diamond).
Map IDs to game assets (characters, items, scenes) with an explicit table. Never parse display names or reuse Unity asset GUIDs as server IDs.
UI subscriptions​
ProjectVUiSubscriptions adds SubscribeUiAsync to the Authentication,
Startup and Header presenters:
var subscription = await header.SubscribeUiAsync(ProjectVUiBindingId.Header, ApplyHeader, token);
ProjectVUiBindingId (LoginAuthentication, LoginStartup, Header) must
match the presenter, otherwise it throws. The helper observes when the
synchronous apply callback returns (not rendering or backend completion);
otherwise it behaves like SubscribeAsync.