Jump to content

Can RenderTexture draw GameObjects.Text?


kuoruan
 Share

Recommended Posts

I new a Text object and want draw it on renderTexture

let text = new Phaser.GameObjects.Text(scene, x, y, bet.value, {
      fontFamily: 'Helvetica, Arial',
      fontSize: '14px',
      fill: Color.WHITE,
      align: 'center'
    }).setOrigin(0.5)

// Want

renderTexture.draw(text.texture, text.frame, 0, 0)

But I can't get the texture and frame of a Text Object.

Link to comment
Share on other sites

2 hours ago, PixelPicoSean said:

RenderTexture can only draw texture frames. But you can generate a texture from text inner canvas.

Can you please tell me the detail that generate a texture from text inner canvas?

Link to comment
Share on other sites

  • 3 years later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...