Skip to content

Layer is not extended from GameObject class #7295

@rexrainbow

Description

@rexrainbow

Version

  • Phaser Version: 4.1.0
  • Operating system:
  • Browser:

Description

Test code

var layer = this.add.layer();
var isGameObject = layer instanceof Phaser.GameObjects.GameObject;
console.log(isGameObject);

false in console.

Although it call GameObject.call(this, scene, 'Layer'), but the layer instanceof Phaser.GameObjects.GameObject is still return false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions