Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Combine TMPRO Mesh without using Render Textures

Discussion in 'UGUI & TextMesh Pro' started by Ham_Slices, Nov 5, 2022.

  1. Ham_Slices

    Ham_Slices

    Joined:
    Sep 29, 2018
    Posts:
    1
    Hi Everyone,

    I'm working on creating card gameobjects in a card-battler that I'm working on.

    The cards themselves have a material/shader on them that allows it to slowly materialize(? Sorry, don't know the exact term for the effect)

    As shown below, the text is basically always visible as expected (forgive my ugly placeholder asset). Ultimately I'd like the text to impacted by the shader concurrently with the card itself.

    upload_2022-11-5_5-36-56.png

    The following posts were the ones that I was able to find about this particular scenario:
    https://forum.unity.com/threads/is-it-possible-to-combine-tmp-with-another-mesh.522210/
    https://forum.unity.com/threads/merge-textmeshpro-with-ui-image-or-ui-rawimage.664393/

    In both cases the preferred solution seems to be using render textures. If I did something like that I'm guessing I have 2 options then:
    1. Have a dozen or so individual cameras off screen each focused in on a single playing card prefab that then get referenced in the scene.
    2. On startup, cycling through each card configuration, creating a new Texture2D instance, then using Sprite.Create() and storing that for later.

    I'm wondering if there are any options other than the 2 listed above, since these seem somewhat contrived and I'm worried that these solutions will limit my ability to configure tooltips, apply secondary textures, etc.

    Thanks for the help!