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"

resolution and window mode

After looking on AnswerHub I found 4 possible ways to set the desired resolution and windowed mode (windowed or fullscreen) for your packaged game:

1)

Create a file DefaultGameUserSettings.ini and put it in your project's Config directory. Now when you package your game, it will run at the correct resolution (and windowed/fullscreen mode) based on the settings in the .ini file.

(The .ini file seems to be inaccessible after you package the game so the player can't edit it and tweak the settings. I could be wrong but I didn't find a way to edit the .ini file after packaging.)

2)

Package the game as you normally would and then manually add a GameUserSettings.ini file to: WindowsNoEditor\MyProject\Saved\Config\WindowsNoEditor

(This is a lot like option 1 except now the player can manually edit the .ini file to enter the resolution and windowed mode they want.)

*Sample contents of the .ini file can be found here: https://answers.unrealengine.com/questions/51623/how-to-fullscreen-packaged-build.html

3)

In game menu level blueprint BeginPlay add a "Execute Console Command" node and run a command (for example):

 r.setRes 800x600w

 r.setRes 800x600f

where w is for windowed mode and f is for fullscreen mode.

4)

In C++ code in your GameMode's BeginPlay:

 UGameUserSettings* MyGameSettings = GEngine->GetGameUserSettings();

Then you can use this pointer to change the resolution and settings in C++ code. The documentation for that class can be found here: http://api.unrealengine.com/INT/API/Runtime/Engine/GameFramework/UGameUserSettings/index.html

So what is the recommeneded way to set the resolution and windowed mode for your packaged game? Should we be editing that .ini file manually?

Product Version: UE 4.18
Tags:
more ▼

asked Mar 17 '18 at 11:15 PM in Packaging & Deployment

avatar image

jr557
48 10 14 21

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

1 answer: sort voted first

You can also use command line parameters when you run the game exe (`-ResX=1280 -ResY=720 -WINDOWED`).

I don't think any of these is the "right" way to do it. You can allow some combination but ultimately there should be a settings menu in-game that lets the user change these things.

I found this. I think it would be a good place to start. He uses console commands (the video is a bit old) but now there are some new nodes. I know of at least one ("SetOverallScalabilityLevel"). Matt Wadstein has a video on it here and I'm sure he has videos on any other scalability node that is available.

more ▼

answered Mar 18 '18 at 12:07 AM

avatar image

Jin_VE
4.4k 32 79 42

avatar image Jin_VE Mar 18 '18 at 12:10 AM

Looks like the main node you want to check out is called "GetGameUserSettings".

avatar image jr557 Mar 18 '18 at 04:03 PM

The settings menu would be ideal but I just wanted to set the default res and window mode when the user opens for the first time. I guess there is no "right" way like you said as long as it works. None of the options seems ideal I was just wondering if there was a more or less common way of setting the defaults.

avatar image Jin_VE Mar 18 '18 at 06:34 PM

For defaults I'd go with the ini. Then you can change it after packaging -- and your more advanced users can fiddle with it too.

(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