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. 

[Closed] コードから表示したUMGの位置について

お世話になっております。

C++のコードから作成したUUserWidgetのアセットを画面に配置すると
アンカーを左上に合わせてあるはずが、全体的に右下に偏ってしまいます。 上部と左側に一定幅の隙間ができています。

 FVector2D position = FVector2D(0.0f,0.0f);

~~中略~~

 auto umgInstance = CreateWidget(WORLD_, umgClass.Get());
 umgInstance->m_ZOrder = zOrder;
 umgInstance->SetPosition(position);
 umgInstance->m_LifeTime = lifeTime;

現在、上記の設定を生成したインスタンスに対して行っています。 プレビューでUIの正確な位置を設定するにはどういった操作が必要か、ご教示いただけますと幸いです。

以上、よろしくお願いいたします。

Product Version: Not Selected
Tags:
more ▼

asked Feb 21 '19 at 12:07 PM in Japanese

avatar image

Answers.Archive STAFF
1.9k 204 312 684

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

The question has been closed Feb 21 '19 at 12:20 PM by Nori Shinoyama for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

お世話になります。

UUserWidgetのSetAnchorsInViewportを試しました?

https://api.unrealengine.com/INT/API/Runtime/UMG/Blueprint/UUserWidget/SetAnchorsInViewport/index.html

よろしくお願いします。

more ▼

answered Feb 21 '19 at 12:07 PM

avatar image

Answers.Archive STAFF
1.9k 204 312 684

avatar image Answers.Archive STAFF Feb 21 '19 at 12:07 PM

回答ありがとうございます。

SetAnchorsInViewportを用いて、無事希望通りの動作がかないました。
ありがとうございました。

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

Follow this question

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

Answers to this question