Skip to content

Fixes for fundamental flaws with TMP animators#263

Closed
lclandrews wants to merge 1 commit intoannulusgames:mainfrom
lclandrews:fix/text-mesh-pro-animator
Closed

Fixes for fundamental flaws with TMP animators#263
lclandrews wants to merge 1 commit intoannulusgames:mainfrom
lclandrews:fix/text-mesh-pro-animator

Conversation

@lclandrews
Copy link

The previous implementation would never reset the animator or return it to the pool as isDirty was not set back to false upon completion. The requirements for returning the the pool where based on TryUpdate returning false. This method only returned false if the target is null. The target was only set to null internall during it's return to the pool so animators are only released if the target object is destroyed entirely.

This resolves this by introducing a per-character dirty flag to ensure that dirty animators can be tracked more effectively.

This has required introducing minor allocations through the closures capturing the character index and animator within the extension methods.

The previous implementation would never reset the animator or return it to the pool as isDirty was not set back to false upon completion.
This resolves this by introducing a per character dirty flag to ensure that dirty animators can be tracked more effectively.
This has however required introducing minor allocations through the closures capturing the character index and animator within the extension methods.
@lclandrews
Copy link
Author

I understand that the introduced allocations are not ideal; however, without further context being added to the WithOnComplete method and callback, I could not find a more appropriate solution. I would be happy to continue further development of this fix if you have suggestions on how this can be resolved.

@nuskey8
Copy link
Member

nuskey8 commented Mar 19, 2026

Thank you for your pull request.

I have fixed the issue while maintaining performance by implementing reference count-based tracking using #269. Therefore, I'm sorry, but I will be closing this PR.

@nuskey8 nuskey8 closed this Mar 19, 2026
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

Successfully merging this pull request may close these issues.

2 participants