Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Text: Empty textboxes when switchting out text with rich text <tags> via script #168

Closed
5 of 6 tasks
Podden opened this issue Jul 20, 2023 · 3 comments
Closed
5 of 6 tasks
Labels
bug Something isn't working fixed β†’ to verify but needs testing

Comments

@Podden
Copy link

Podden commented Jul 20, 2023

Describe the bug πŸ’¬

I noticed that I sometimes get empty text boxes, When I'm switching out text on a text component which has tags in it with another one which hasn't.

Operating System πŸ‘©β€πŸ’»

Windows

What browsers are you seeing the problem on? πŸ„β€β™‚οΈ

No response

Editor Version 🎲

2022.x

Needle Exporter version

3.10.2

Project Info (Unity only) πŸ“œ

No response

Steps to reproduce πŸ”’

1. Creating a Script with two strings which switches out text in text components, eg:
 private textfield: Text | null = null;
 public setText(language: string) {
        if (!this.textfield) {
            this.textfield = GameObject.getComponent(this.gameObject, Text);
        }
        if (this.textfield) {
            if (language === "de")
                this.textfield.text = this.textDE;
            else if (language === "en")
                this.textfield.text = this.textEN;
            else if (language === "nl")
                this.textfield.text = this.textNL;
        }
    }
2. Filling the Strings in the Editor with text with and without rich text tags
3. Switching between them in the build

Reproduction β™»

No response

Discord or Discussion link

No response

Validations 🩹

@Podden Podden added the untriaged Newly reported issue label Jul 20, 2023
@marwie
Copy link
Member

marwie commented Jul 20, 2023

Hi, thanks for the report. Reproduced the issue here

@marwie
Copy link
Member

marwie commented Jul 20, 2023

Should be fixed in the next update ( > 3.10.2-pre)

20230720-170033_Switch_Text_-_Google_Chrome-logo.mp4

@marwie marwie added bug Something isn't working fixed β†’ to verify but needs testing and removed untriaged Newly reported issue labels Jul 20, 2023
@marwie
Copy link
Member

marwie commented Sep 3, 2023

closing due to inactivity

@marwie marwie closed this as completed Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed β†’ to verify but needs testing
Projects
None yet
Development

No branches or pull requests

2 participants