You feel that your text is too simple/static? Solution here! Text Action Pro [Released!]

_**https://www.youtube.com/watch?v=UtbLYktmUC0**_

Text Action Pro features:

  • Support multiple links (or “buttons”) inside one text component

  • Support animation, creating “wave” for text is possible and many other effect, see video for reference

  • Curve for text: you could make uneven text very easily and visually via curve field

  • Link behave like button in new ui: you could tint color, use fade duration, play animation on click/press/highlight etc., only sprite swap isnt supported

  • Link work even on curved text and multiline except curved AND offsetted multiline link (still fire events but there is huge chance to see incorrect recognize clickable area, see video in thread for reference)

  • You could check which character was clicked with TextWithEvents.lastClickedIndex

  • Semi-automated editor functionality - button is properly generated during typing text into text field; after this you only need some adjusting variables

  • You can animate every link separately: look into Link component inculded in every new button (children of text)

  • You can swap whole text with another text which contain another links

  • source code included

for only 5$!

https://www.assetstore.unity3d.com/#!/content/26313

Getting started is very simple: attach TextWithEvents component to UI’s GO and paste text into text field; then type your link. Look at the end of text field on the pictures below for better explanation.

WARNING! if you need support for color, then you should type color tag BEFORE a href tag or tinting will not work. See pictures again.


Feedbacks and bug reports are appreciated :wink:

You need test this before buy?

then see lite version as .unitypackage linked below

however: this is limited (mostly animation related features are stripped)

Known issues:

  • multiline, curved text with offset in x dimension between lines might have incorrect clickable area (you can see this in video) i decided to drop support for this case because no worth effort and potential performance drop
  • if you change existing name of link in text field then you could see that multiple buttons is generated. Solution: delete value of href attribute with “>” then retype new value of href and finish with “>”

1890350–133814–TextActionFree.unitypackage (85.9 KB)

Looks quite cool, though I think you should redo your video at a higher res since it is not possible to make out what you are typing and as that is all the video is showing it would be useful to see what it is you are doing :slight_smile:

Oh i see fortunetly still have original uncompressed source so i will try improve res. As a note to what i was typed in video: in pack is example scene with very similar setup and short documentation and getting started, pictures in this thread have exposed text field on link too so if you are courious what should be typed look at these pictures or example scene. Thanks for feedback! :wink:

Sorry for silence radio but was busy with other projects. I increased contrast a bit, and remember default res is 360p. if u have trouble with pixelation set higher res, maybe help a bit. if you still have trouble then i will upload new video with smaller compression

version 1.0.1 released

  • fix for ArgumentOutOfRange on attach TextWithEvents
  • added proper support for no color case

oh and 50% OFF! for 3 days ;). Enjoy!

2 days left

last day

Can this also be generalized to curve the whole UI canvas? As discussed here: Warp/bend the UI - Unity Engine - Unity Discussions

I answered you via PM: short answer - no because this is designed for text only.

BTW: I decided to keep lower price and no plan for any off in future. I think 5$ is low enough.

I tried out the free trial awhile back and noticed a bug. If I instantiate my UI, this breaks the textbutton. In the hierarchy, the instantiated gameobject with the textbutton component isn’t activated. Is this fixed in the Pro version, or is there a fix for this?

Sorry completely forgot to refresh trial - new version is much more close to PRO (see new .unitypackage uploaded in first post), most bug fixed only these mentioned in first post + new i found that is solvable by modyfying two float values at 157 and 158 line in TextButton.cs (nothing more and listed below)

tpi.y += 7f;
tpj.y -= 7f;

Why i didnt fixed this? because value depend on screen ratio (try random resize Game View in any direction in editor, play with link and you will see about what i say) but unable to find nice working function which will adjust this value properly so you have to adjust these floats manually - if you plan deploy on multiple platform you could use conditional compilation with preprocessor directives

If anyone is looking to change the text during runtime, I’ve added this fuction to TextWithEvents.cs.
So after setting the text attribute you need to run it to validate the link tags.

  public void DoValidate()
        {
           
            base.text = OnBeforeValueChange(this.text);
            var allTextButtons = GetComponentsInChildren<TextButton>();
            for (var id = 0; id < allTextButtons.Length; id++)
                allTextButtons[id].WrapperForValidation();
           
        }

Hi Breyer,

Can you update for 5.2.3 :

Assets/TextAction/TextWithEvents.cs(163,38): error CS0619: UnityEngine.UI.Graphic.OnFillVBO(System.Collections.Generic.List<UnityEngine.UIVertex>)' is obsolete: Use OnPopulateMesh instead.’

Did anyone manage to sort this particular error out? It’s been a while since I’ve needed this functionality but it would be handy right about now :slight_smile:

Replace OnFillVBO inTextWithEvents by:

protected override void OnPopulateMesh(VertexHelper toFill)
    {
        base.OnPopulateMesh(toFill);

        List<UIVertex> vbo = new List<UIVertex>();
        toFill.GetUIVertexStream(vbo);

        for (int index = 0; index < vbo.Count; index++)
        {
            UIVertex uiVertex = vbo[index];
            uiVertex.position.y += m_CurveData.Evaluate((rectT.rect.width * rectT.pivot.x + uiVertex.position.x) / rectT.rect.width) * curveMultiplier;
            vbo[index] = uiVertex;
        }
    }

Breyer, can you update your script?
Unity 5.4 get this error
ArgumentOutOfRangeException: Cannot be negative, and should not exceed length of string.
And on AssetStore last review:

Nice work but……
(0 of 0 found this review helpful)
It is very helpful for me. Ugui’s rich text is too pool. I try to add link and image tag in it but i’m not good at coding.

This project can’t work in unity 5.3 because ui.text’s interface is changed. I tryed to fix it simply. It works now.

And I’m trying to add image tag, like </img name=imgname offsetx=0 offsety=0 size=100> or imgname, but not work yet.

Hi, I am getting this error:

Can’t add ‘Image’ to clickedHash because a ‘Image’ is already added to the game object!
A GameObject can only contain one ‘Graphic’ component.

clickedHash is the name of the event I am trying to run. I am trying to have mulitple clickable hashtags.

This is the type of string I am attemping to use:

"<ahref=clickedHash><color=red>{0}</color></a>"

Where {0} is the hash tag

Could it be because of multiple hashtags? Or something else?