{"id":5221,"date":"2023-10-19T23:31:03","date_gmt":"2023-10-19T15:31:03","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=5221"},"modified":"2023-10-21T22:28:42","modified_gmt":"2023-10-21T14:28:42","slug":"assorted-tips-and-tricks","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=5221","title":{"rendered":"Assorted tips and tricks"},"content":{"rendered":"\n<p><a href=\"https:\/\/landelare.github.io\/2022\/09\/27\/tips-and-tricks.html\">https:\/\/landelare.github.io\/2022\/09\/27\/tips-and-tricks.html<\/a><\/p>\n\n\n\n<p>This will be nothing new for you if you\u2019ve read Unity starter pack, but these turned out to be more popular among people who are otherwise not transitioning from Unity.<\/p>\n\n\n\n<p>Screen-space rotation widgetPermalink<br>\nUsers transitioning from Unity often miss this gizmo, and for some reason it\u2019s off by default.<\/p>\n\n\n\n<p>In Editor Preferences, look for Enable Screen Rotate (there\u2019s a search bar), or add this to DefaultEditorPerProjectUserSettings.ini in Config (create it if it doesn\u2019t exist yet):<\/p>\n\n\n\n<p>[\/Script\/UnrealEd.LevelEditorViewportSettings]<br>\nbAllowScreenRotate=True<br>\nAutomatically update C++ binariesPermalink<br>\nIf your team is small enough that you can have everyone install Visual Studio, add this to DefaultEditorPerProjectUserSettings.ini:<\/p>\n\n\n\n<p>[\/Script\/UnrealEd.EditorLoadingSavingSettings]<br>\nbForceCompilationAtStartup=True<br>\nThis makes it so that opening the project from the .uproject file compiles C++, avoiding having to make and distribute builds across the team. Designers and artists need only to install the required build tools, forget they ever existed, and enjoy using the correct binaries with zero additional effort. Otherwise, note that .uproject uses the Development Editor configuration, which is optimized. If you\u2019ve been working with DebugGame Editor it might be outdated. For developers the easy \u201cfix\u201d is to always launch the editor from VS.<\/p>\n\n\n\n<p>If you have settings in Saved, those take precedence so check there if it doesn\u2019t seem to have an effect. That\u2019s EditorPerProjectUserSettings.ini without Default in its name.<\/p>\n\n\n\n<p>This regressed in UE5: the popup that would show compilation progress in UE4 doesn\u2019t appear anymore. As of writing, this is not fixed yet. The current version is 5.2.0. Your project will look like it\u2019s not launching, but you can observe high CPU usage while your code is otherwise compiling in the background normally. You will get either the editor splash screen, or a message box with an error eventually.<\/p>\n\n\n\n<p>Restore camera after Play-In-EditorPermalink<br>\nBy default the camera stays where you were when you ended PIE. If you prefer, you can change it to return where it was by adding this to DefaultEditorPerProjectUserSettings.ini:<\/p>\n\n\n\n<p>[\/Script\/UnrealEd.LevelEditorViewportSettings]<br>\nbEnableViewportCameraToUpdateFromPIV=False<br>\nPIV was the old name of PIE: Play-In-Viewport.<\/p>\n\n\n\n<p>Debug memory-related crashesPermalink<br>\nLaunch with -stompmalloc (use UnrealVS or EzArgs) and issue the gc.CollectGarbageEveryFrame 1 console command.<\/p>\n\n\n\n<p>Attempt to reproduce your problem, you should have a much cleaner call stack leading to the crash, often directly telling you what went wrong.<\/p>\n\n\n\n<p>Opt out of data collectionPermalink<br>\nThese are also editor options but since you probably have DefaultEditorPerProjectUserSettings.ini open already:<\/p>\n\n\n\n<p>[\/Script\/UnrealEd.AnalyticsPrivacySettings]<br>\nbSendUsageData=False<\/p>\n\n\n\n<p>[\/Script\/UnrealEd.CrashReportsPrivacySettings]<br>\nbSendUnattendedBugReports=False<br>\nIf you want to further reduce the amount of network traffic that the editor generates, add this to DefaultEngine.ini but note that this can impact functionality:<\/p>\n\n\n\n<p>[\/Script\/UdpMessaging.UdpMessagingSettings]<br>\nEnabledByDefault=False<br>\nEnableTransport=False<\/p>\n\n\n\n<p>[\/Script\/TcpMessaging.TcpMessagingSettings]<br>\nEnableTransport=False<br>\nGreatly reduce shader compilationPermalink<br>\nUE5.1 update: This is now turned on by default.<\/p>\n\n\n\n<p>DefaultEngine.ini:<\/p>\n\n\n\n<p>[SystemSettings]<br>\nr.ShaderCompiler.JobCacheDDC=1<br>\nThis makes shaders get compiled on demand instead of thousands upfront.<\/p>\n\n\n\n<p>Use your entire CPU to compile shadersPermalink<br>\nBy default, Unreal throttles itself to around 80% of your CPU to compile shaders. To make it use all your CPU to compile faster, add this to DefaultEngine.ini:<\/p>\n\n\n\n<p>[DevOptions.Shaders]<br>\nNumUnusedShaderCompilingThreads=0<br>\nPercentageUnusedShaderCompilingThreads=0<br>\nWorkerProcessPriority=1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/landelare.github.io\/2022\/09\/27\/tips-and-tricks. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/5221"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5221"}],"version-history":[{"count":1,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/5221\/revisions"}],"predecessor-version":[{"id":5222,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/5221\/revisions\/5222"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}