Phaser API Documentation

  Version: 
nineslice(config, [addToScene])

Description:

Creates a new Nine Slice Game Object and returns it.

Note: This method will only be available if the Nine Slice Game Object and WebGL support have been built into Phaser.

Parameters:

name type arguments description
config Phaser.Types.GameObjects.NineSlice.NineSliceConfig

The configuration object this Game Object will use to create itself.

addToScene boolean <optional>

Add this Game Object to the Scene after creating it? If set this argument overrides the add property in the config object.

Returns:
Description:

The Game Object that was created.

Since: 3.60.0