Phaser API Documentation

  Version: 
setGameObject(gameObject, [frame])

Description:

Custom pipelines can use this method in order to perform any required pre-batch tasks for the given Game Object. It must return the texture unit the Game Object was assigned.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.GameObject

The Game Object being rendered or added to the batch.

frame Phaser.Textures.Frame <optional>

Optional frame to use. Can override that of the Game Object.

Returns:
Description:

The texture unit the Game Object has been assigned.

Type:
  • number
Examples:
Since: 3.50.0