Phaser API Documentation

  Version: 
preBatch(gameObject)

Description:

This method is called by the WebGLPipeline.batchQuad method, right before a quad belonging to a Game Object is about to be added to the batch.

It is also called directly bu custom Game Objects, such as Nine Slice or Mesh, from their render methods.

It causes a batch flush, then calls the preBatch method on the Post FX Pipelines belonging to the Game Object.

It should be followed by a call to postBatch to complete the process.

Parameters:

name type description
gameObject Phaser.GameObjects.GameObject

The Game Object about to be batched.

Since: 3.50.0