Struct SteamCallbackMessage
A raw Steam callback as delivered to the OnCallback event. Payload points into a dispatcher-owned buffer that is valid only during the handler call: decode it there with As<T>() and copy out any data that must outlive the call.
Inherited Members
Namespace: Unity.Steamworks.Interop
Assembly: Unity.Steamworks.Interop.dll
Syntax
public readonly struct SteamCallbackMessage
Fields
CallbackId
The callback id; compare it with a callback struct's k_iCallback.
Declaration
public readonly int CallbackId
Field Value
| Type | Description |
|---|---|
| int |
Payload
The callback payload; valid only inside the handler.
Declaration
public readonly IntPtr Payload
Field Value
| Type | Description |
|---|---|
| IntPtr |
Size
Size in bytes of the payload.
Declaration
public readonly int Size
Field Value
| Type | Description |
|---|---|
| int |
SteamUser
The Steam user this callback applies to.
Declaration
public readonly int SteamUser
Field Value
| Type | Description |
|---|---|
| int |
Methods
As<T>()
Decodes the payload as a callback struct; call it only inside the handler that received the message.
Declaration
public T As<T>() where T : struct
Returns
| Type | Description |
|---|---|
| T | The payload decoded as |
Type Parameters
| Name | Description |
|---|---|
| T | The callback struct this message carries. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The message has no payload, or |