Trigger API Reference\DCEI Functions\Debug

void DebugPause()

void DebugPause()

Description


Triggers a game pause. Useful when you need to debug the game state at a certain point.

Example Usage


In this example, we use an Effect Hook to pause the game as soon as an effect launches.

DCEI.TriggerAddEffectHookEvent(
    DCEI.Effect("Standard RangedUnit Weapon Launch"),
    function(context)
        DCEI.DebugPause()
    end
)

void SetDevTogglePosition(float x, float y)

void SetDevTogglePosition(float x, float y)

Description


Sets the Dev Toggle Box Position to x,y position on screen. This allows the button to be repositioned at runtime, and help avoid occluding other interactive UI elements.

Parameters

Example Usage

local button = DCEI.CreateButtonFrame(DCEI.GetUiRootFrame())
DCEI.SetFrameSize(button, 100, 100)
DCEI.SetOnClickCallback(
    button,
    function()
        -- Move the dev toggle when button is clicked.
        DCEI.SetDevTogglePosition(100, 0)
    end
)