How to use text as an object?

When applying objects and you want to use them in your game as something it’s easy. however for my soccer game i want to add a text into my game and I spent hours trying to figure it out. What I’m saying is i want to add the word “Dont!” And use it in my game it will be that when the user taps on this text the game will end.

Hello Kareem,

I think you are looking for UMG. If you would like to know a little more UMG, please take a look at the posts below.

Hope it helps!

Sorry man nothing helps me what i want is that any word can be used in my game and i can actually click on it and it would DO something

UMG is what you want. It can add text and buttons. Give the tutorials a go and read the documentation.

Use UMG or a combination of Canvas text drawing and your own mouse click tracking (is mouse in area of text? is mouse clicked? do my thing).

Hi Kareem,

I have add a step-by-step example for you.

  1. First, you should create widget blueprint (Content Browser → Create/New → UI → Widget Blueprint)
  2. Open it and add a button and text from Pallete to Visual Disigner. Text add to button (all elements have hierarchical structure). If you want to hide button, set up alpha for Background Color to 0 (Details → Appearance).

  1. Add event

  1. Show menu

Best regards,

Thanks for taking your time appreciate it I may now use text !