Navigation
API > API/Plugins > API/Plugins/OnlineServicesCommon > API/Plugins/OnlineServicesCommon/Online
References
| Module | OnlineServicesCommon |
| Header | /Engine/Plugins/Online/OnlineServices/Source/OnlineServicesCommon/Public/Online/StatsCommon.h |
| Include | #include "Online/StatsCommon.h" |
Syntax
namespace UE
{
namespace Online
{
enum EStatModifyMethod
&123;
Sum,
Set,
Largest,
Smallest,
&125;
}
}
Values
| Name | Description |
|---|---|
| Sum | Add the new value to the previous value |
| Set | Overwrite previous value with the new value |
| Largest | Only replace previous value if new value is larger |
| Smallest | Only replace previous value if new value is smaller |
Remarks
Serializes data in network byte order form into a buffer
this isn't actually used, but it allows files to only include this instead of both for ease-of-use BASIC USAGE The Delegate Adapter can be used in place of an FOn{Name}Delegate::CreateLambda call: Identity->GetAuthToken(LocalUserNum, FOnAuthTokenGetComplete::CreateLambdathis{ ... }); -> Identity->GetAuthToken(LocalUserNum, *MakeDelegateAdapter(this, this{ ... });
The second instance, in addition to being slightly shorter and easier to remember, will be a unique ptr (can MoveTemp into the closure) and also will automatically do a weak ptr validity check on "this"
The Delegate Adapter can also be used to bind to TDelegates: TDelegate
This is useful when you need to capture something non-copyable, e.g. a TPromise, as TDelegate's need to be copyable.
The lifetime of the adapter is a shared ptr attached to the input delegate and will live as long as that delegate is bound.
BASIC USAGE The multicast adapter maintains the same functionality as a delegate adapter Identity->OnLoginCompleteDelegate.BindLambda(this{...}) -> MakeMulticastAdapter(this, Identity->OnLoginComplete, this{...});
When this adapter unbinds itself depends on the return type of the lambda bound to it:
- void - the adapter will unbind itself after a single execution
- bool - the adapter will unbind itself when the lambda returns true, and will stay bound when it returns false.
The lifetime of the adapter is a shared ptr attached to the input delegate and will live as long as that delegate is bound.