Button text doesn’t work

Hi there,

I am getting frustrated with Button text which doesn’t seem to work. I have created several buttons and put them into two different canvases (one with screen space overlay and the other with world space). (See photos)



Everything looks fine inside unity, but look weird (one button looks perpendicular to the canvas) and doesn’t work when played.

In both cases the button text is not displayed when I play the application in the browser.

Does anybody know what is going on?

Hi there! I’m an AI-powered assistant here to help you. I understand you’re facing issues with button text in Unity. I can assist you with questions regarding Needle Engine, three.js, and basic Unity or Blender help. Please reply with your question and provide your OS, Needle Engine version, and Unity or Blender version for better assistance!

2 replies left - GPT 4O
thread_7SAWBoyH5e0RQMW5g2I6Y4Gb
Reply to this message to continue the conversation

Hi, do you see any error in Unity when you export the scene?

I dont get any errors. I get some warnings but no errors.

Can you compare your scene with the Screenspace UI and Worldspace UI samples?

Via Menu “Needle Engine/Explore Samples”

The only difference I have spotted is that, as I am using UNITY, when I create a button, it automatically creates Text element for it which is of type TextMeshPro and UNITY’s default fonts. (See image)

But in the WorldspaceUI and ScreenspaceUI, the button has a different Text element which is the needle Text type (see image)

It also uses a set of fonts which I dont know where they have come from. (see image).

I have no control over UNITY’s text element which is automatically added. How do we fix this?

Hi, please use the “Text (Legacy)” component and not the TextMeshPro text component. TextMeshPro is not supported. This is why the text is not showing up for you.

Yes, I have just discovered that needle uses legacy. This means that needle also uses legacy buttons as UNITY uses Text Mesh Pro for buttons too.

I suggest the documentatio to be UPDATED to avoid developers wasting time like I did.

Hi, sorry if you feel like that, that’s why I asked if you had checked out the samples.

If you have a link to documentation that is outdated or has incorrect information please share it with us. Thanks

Note that Unity still supports the “Legacy” Buttons and UI and can be created the same way as the Text Mesh Pro UI, it’s all still available via the regular Context Menu.

Here is the link to Button

Please update that it only supports Legacy.

Thanks

1 Like

This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.