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

LayaAir 3.3.0 --> Index out of range: -1 at localhost:18090/libs/laya.core.js:17473 (layaAir 3.2.2 = no error, working as expected.) #1766

Open
Lykdraft opened this issue Jan 15, 2025 · 0 comments

Comments

@Lykdraft
Copy link

Lykdraft commented Jan 15, 2025

Describe the bug
LayaAir 3.3.0 --> Error: Index out of range: -1 at localhost:18090/libs/laya.core.js:17473

To Reproduce
Steps to reproduce the behavior:
use LayaAir 3.3.0

Expected behavior
Script should work, like in LayaAir 3.2.2
This is a snippet of the code, where seemingly the script breaks in LayaAir 3.3.0:

```
if (this.isTypewriter){
        console.log("Typewriter effect started");
        
        // Start typewriter effect
        await new Promise<void>((resolve) => {
            this.typewriterEffect.play(content, () => {
                this.isTypingComplete = true;
                console.log("Typewriter effect complete");
                resolve();
            });
        });
    } else {
        await this.fadeInTextByLine(content);
    }```

if this.isTypewriter is set to true, console.log shows "Typewriter effect started" but not the "Typewriter effect complete". The Error Index out of range: -1 at localhost:18090/libs/laya.core.js:17473 shows. And no text is printed in the game. In Laya 3.2.2 "Typewriter effect complete" shows and the script works without any problem.

I think something in the core is not as it was before. Any ideas?

Best,
tL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant