Search Unity

TextMesh Pro Wave Example

Discussion in 'UGUI & TextMesh Pro' started by Graham-B, Apr 26, 2018.

  1. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    331
    Can someone please direct me towards the CharacterColorizer.cs script seen in this example? It doesn't seem to be included with the asset. I only need to know how to make waves, but would be cool to have access to the other vertex animation examples from the video as well!



    Thank you.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Included in the TextMesh Pro/Examples & Extras/Scripts is the VertexColorCycler.cs script and a few other like VertexJitter that provide good examples of how to manipulate the vertex attributes.

    I have attached the old script that was used in those examples. This script will not work anymore since too many thing have changed since then but you should be able to look at how the wave was implemented and adapt it to the newer implementation used in examples like VertexJitter.cs
     

    Attached Files:

    skullthug and Graham-B like this.
  3. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    331
    Thanks Stephan! I'm sure it will still be of some use.
     
  4. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    Hey @Graham-B, did you update this script to work with the newer version of TextMeshPro?
    It looks like a really useful script.
     
  5. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    331
    No @FeastSC2 I never did. I ended up using an alternative text mesh asset.
     
    FeastSC2 likes this.
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You should be able to revise the script to adapt it to the newer implementation. Look at the scripts included in the TMP Examples & Extras.

    upload_2019-5-26_15-41-24.png

    When I have time, I can take a look at updating the old script and adding it in some example.
     
    FeastSC2 likes this.
  7. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    Yes I saw those examples in the extras, that's what got me interested in all this.

    Cool, that would be awesome! Thanks Stephan, I can wait that you do this,, much appreciated :)
    Very impressed by TextMeshPro by the way. Must be a lot of work to have made it!
     
  8. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    @Stephan_B
    Hey Stephan, I used the VertexJitter script some to test it out, I had some weird stuff happening.

    I have a textmeshpro to show the dialog in my game, after engaging the first time in a dialog some text mesh remains and is not being cleaned up when using the VertexJitter script.

    Here's a gif showing what happens (first time I talk to NPC, no problem, watch the second I talk to him, there's a text mesh left over that doesn't get cleaned up).
    https://giphy.com/gifs/WRLeU0c51Azj6uqLbS


    A picture showing the problem:
    Unity_2019-05-26_17-15-45.png
     
  9. Thaxxel

    Thaxxel

    Joined:
    Jan 14, 2014
    Posts:
    8
    For anyone interested, or wanting to further work on this - here is a modified version of the VertexAttributeModifier.cs that works with 2019 TextMeshPro components. It doesn't update during run time - but seems to do the trick :)
     

    Attached Files:

    Last edited: Aug 7, 2019
    skullthug, linnspitz and FeastSC2 like this.
  10. Tamerlana

    Tamerlana

    Joined:
    Jun 3, 2017
    Posts:
    2
    Thanks, you are my savior!
     
  11. rajkutit

    rajkutit

    Joined:
    May 11, 2013
    Posts:
    1
    VertexAttributeModifier for TextMeshProUGI component is not helping, and I tried with warptextexample.cs but not able to loop animation.
    Any help to loop animation.

    thanks in advance.
     
    Last edited: Nov 18, 2019
  12. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    @Stephan_B Are you still supporting these scripts for 2019.2 \ 2019.3 or have you moved onto other projects ?:oops:

    Thanks
     
    FeastSC2 likes this.
  13. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    I have made an update to the script:
    - added 2 effects (ShakeA and ShakeB)
    - Animation works both on UI and on 3D texts.
    - You can stop/start the text animation.

    Here are the problems remaining with this script:
    - When used on UI, if your text uses multiple fonts (because it's missing characters in the primary font) then some mesh objects might remain.
    - the Warp AnimationMode does nothing.
    - the ShakeA and ShakeB don't really play nice when changing the text.
    - the effects don't look very good except for Wave when the text is slowly being revealed letter per letter.

    PS: Remove the "using using Sirenix.OdinInspector;" on the very top of the script to make it work.
     

    Attached Files:

    Last edited: Jan 23, 2020
    skullthug and pixelR like this.