AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

RB.ClipDebugEnable

Method  -  Static

public static void ClipDebugEnable(Color32 color)

Parameters

color Color32 RGBA color

Returns

Nothing.

Description

Clip region debugging draws rectangles around the clip regions. The given color will apply to all following calls to RB.ClipSet. RB.ClipDebugEnable can be called multiple times to change the color of different clip regions.

Clip region debugging can sometimes be helpful in figuring out why draw calls are being clipped!

Example

const int LAYER_TERRAIN_MINIMAP = 0;

void Update() {
    if (RB.KeyPressed(KeyCode.F12)) {
        RB.ClipDebugEnable(Color.red);
    } else if (RB.KeyPressed(KeyCode.F11)) {
        RB.ClipDebugDisable();
    }
}

void Render()
{
    var oldClipRegion = RB.ClipGet();

    // Use clip region to render a minimap in the top left corner of the screen
    RB.ClipSet(new Vector2i(00128128);
    RB.DrawMapLayer(LAYER_TERRAIN_MINIMAP);

    RB.ClipSet(oldClipRegion);
}

See Also

RB.ClipDebugDisable
RB.ClipSet
RB.ClipGet
RB.ClipReset

See Docs

Features - Clip Region Debugging