Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

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:
    246
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,325
    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:

    Graham-B likes this.
  3. Graham-B

    Graham-B

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

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    860
    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:
    246
    No @FeastSC2 I never did. I ended up using an alternative text mesh asset.
     
    FeastSC2 likes this.
  6. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,325
    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:
    860
    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:
    860
    @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
    FeastSC2 likes this.
  10. TamaraOrlova

    TamaraOrlova

    Joined:
    Jun 3, 2017
    Posts:
    1
    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. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    273
    @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:
    860
    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
unityunity