Search Unity

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

Question TMPro Button in a prefab

Discussion in 'UGUI & TextMesh Pro' started by RandomNode, Aug 11, 2022.

  1. RandomNode


    Nov 19, 2017

    I have created an uber prefab from three smaller prefabs. The small prefabs are:
    1. A TMPro button with text
    2. A slider
    3. A TMPro button with no text
    When my scene loads, five or six uber prefabs are instantiated. What I would like to do is when button 3 is pressed, I want to grab the text from button 1 and store it in a variable in a script on button 3.

    Apologies if there is an obvious solution, the instantiation of the buttons has got me confused.