SteamMainBase is derived by all Steam APIs of the Easy Steamworks Integration Unity plugin. Derive from this class if you want to create a Steam API based on the Easy Steamworks Integration structure. Use this class to handle Steam errors, execute Steam API calls, handle call results and keep track of pending API calls.
More...
Inherits MonoBehaviour.
|
void | Execute< T > (SteamAPICall_t p_steamCall, CallResult< T >.APIDispatchDelegate p_onCompleted) |
| The Execute method will handle Steam CallResult creation and storage. Simply pass the configured SteamAPICall and the callback that you want to be invoked when the work is done. Pending results can be viewed in the console with SteamMainBase.IsDebugLogEnabled set to true . More...
|
|
|
virtual void | OnDisable () |
|
virtual void | LateUpdate () |
|
virtual bool | CheckAndLogResultNoEvent< Trequest > (string p_logText, EResult p_result, bool p_bIOFailure) |
|
virtual bool | CheckAndLogResult< Trequest, Tevent > (string p_logText, EResult p_result, bool p_bIOFailure, string p_eventName, ref System.Action< Tevent > p_event) |
|
virtual void | HandleError (string p_logPrefix, ErrorEventArgs p_error) |
|
virtual void | InvokeEventHandlerSafely< T > (System.Action< T > p_handler, T p_data) |
|
virtual void | SetSingleShotEventHandler< T > (string p_eventName, ref System.Action< T > p_event, System.Action< T > p_handler) |
|
virtual void | CallSingleShotEventHandlers< T > (string p_eventName, T p_args, ref System.Action< T > p_event) |
|
virtual void | ClearSingleShotEventHandlers< T > (string p_eventName, ref System.Action< T > p_event) |
|
|
static SteamMainT | Instance [get] |
| You can use the static Instance property to access the Steam API from wherever you need it in your code. See also SteamMainBase.IsInstanceSet. More...
|
|
static bool | IsInstanceSet [get] |
| The static IsInstanceSet property can be used before accessing the Instance property to prevent a new instance from being created in the teardown phase. For example, if you want to unregister from an event, then first check that IsInstanceSet is true. If it is false, then your event registration is not valid anymore. More...
|
|
bool | IsDebugLogEnabled [get, set] |
| Set this property to true if you want to see a detailed log in the console. Disabled by default. More...
|
|
SteamMainBase is derived by all Steam APIs of the Easy Steamworks Integration Unity plugin. Derive from this class if you want to create a Steam API based on the Easy Steamworks Integration structure. Use this class to handle Steam errors, execute Steam API calls, handle call results and keep track of pending API calls.
◆ CallSingleShotEventHandlers< T >()
◆ CheckAndLogResult< Trequest, Tevent >()
virtual bool LapinerTools.Steam.SteamMainBase< SteamMainT >.CheckAndLogResult< Trequest, Tevent > |
( |
string |
p_logText, |
|
|
EResult |
p_result, |
|
|
bool |
p_bIOFailure, |
|
|
string |
p_eventName, |
|
|
ref System.Action< Tevent > |
p_event |
|
) |
| |
|
protectedvirtual |
◆ CheckAndLogResultNoEvent< Trequest >()
◆ ClearSingleShotEventHandlers< T >()
◆ Execute< T >()
The Execute method will handle Steam CallResult creation and storage. Simply pass the configured SteamAPICall and the callback that you want to be invoked when the work is done. Pending results can be viewed in the console with SteamMainBase.IsDebugLogEnabled set to true
.
- Parameters
-
p_steamCall | the configured SteamAPICall. |
p_onCompleted | invoked when the work is done. |
- Template Parameters
-
◆ HandleError()
◆ InvokeEventHandlerSafely< T >()
◆ LateUpdate()
◆ OnDisable()
◆ SetSingleShotEventHandler< T >()
virtual void LapinerTools.Steam.SteamMainBase< SteamMainT >.SetSingleShotEventHandler< T > |
( |
string |
p_eventName, |
|
|
ref System.Action< T > |
p_event, |
|
|
System.Action< T > |
p_handler |
|
) |
| |
|
protectedvirtual |
◆ m_isDebugLogEnabled
◆ m_lock
◆ m_pendingRequests
◆ s_instance
◆ Instance
◆ IsDebugLogEnabled
Set this property to true
if you want to see a detailed log in the console. Disabled by default.
◆ IsInstanceSet
The static IsInstanceSet property can be used before accessing the Instance property to prevent a new instance from being created in the teardown phase. For example, if you want to unregister from an event, then first check that IsInstanceSet is true. If it is false, then your event registration is not valid anymore.
◆ OnError
Invoked when a Steam error has occured.
The documentation for this class was generated from the following file: