CallNativeFunction
Description
Sends a callback to the engine to run a native function. There are three versions of the function that can be used depending on the amount of parameters needed for the callback:
CallNativeFunction
(no parameters)CallNativeFunction2
(two parameters)CallNativeFunction4
(four parameters)
In order to call a native function by name, a global variable named after the function must be added to the GameConfig. Once added, the engine will automatically set the value of the global variable to the ID of the native function.
Parameters
callback
The index value of the callback.param1
,param2
,param3
,param4
Parameters to use for the callback.
Return Value
Depends on the callback used.
Syntax
Examples
CallNativeFunction4(NotifyCallback, NOTIFY_STATS_ENEMY, StageStatsUsabilityParam1, StageStatsUsabilityParam2, StageStatsUsabilityParam3)
Native Functions
Function | Description |
---|---|
SetAchievement | Sets the status of the given achievement. |
SetLeaderboard | Submits the given score to the given leaderboard. |
HapticEffect | |
Connect2PVS | |
Disconnect2PVS | |
SendEntity | |
SendValue | |
ReceiveEntity | |
ReceiveValue | |
TransmitGlobal | |
ShowPromoPopup | |
NativePlayerWaitingAds | Creates a RewardAds native object, prompting the player to watch an ad. |
NativeWaterPlayerWaitingAds | Creates a RewardAds native object, prompting the player to watch an ad. |
NotifyCallback | Sends the given callback to communicate to Hedgehog Engine 2. |