x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

C++ UMG Change space World to space Screen

Hii, I'm trying to create and display a widget in the screen space to make a floating poster at the top of the player

alt text

And I'm looking for a function that can do that:

alt text

I obtained this screenshot when i add a widget component to my character, but how can i access variable like this one in C++ ? Im really stuck on this problem... :/

Product Version: UE 4.21
Tags:
unknown-1.png (45.2 kB)
unknown.png (3.8 kB)
more ▼

asked Mar 18 '19 at 05:26 PM in C++ Programming

avatar image

Deathtreak
1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Easiest way is to simply declare widget component for character in C++, like any other component, then you can access it in C++ and set that variable. Alternatively you can use this function from character actor to get widget component

https://api.unrealengine.com/INT/API/Runtime/Engine/GameFramework/AActor/GetComponentByClass/index.html

more ▼

answered Mar 18 '19 at 10:01 PM

avatar image

Shadowriver
36.6k 931 169 1111

avatar image Deathtreak Mar 19 '19 at 09:35 AM

I tried but then it crash when i hit play on editor :/

alt text

alt text

first.png (17.0 kB)
2.png (12.1 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question