Search Unity

TextMesh Pro Wave Example

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by Graham-B, Apr 26, 2018.

  1. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    213
    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:
    3,192
    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:
    213
    Thanks Stephan! I'm sure it will still be of some use.
     
  4. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    598
    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:
    213
    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:
    3,192
    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:
    598
    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:
    598
    @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. Tamerlana

    Tamerlana

    Joined:
    Jun 3, 2017
    Posts:
    1
    Thanks, you are my savior!