UE4扯淡大雜燴第二季
假日,是扯淡的日子,正如詩里扯的淡:
你是一樹一樹的花開,
是燕在樑間呢喃,
你是愛、是暖、是希望,
你是人間的四月天!
UnrealVS的蛋
UnrealVS 在 VS2015--Tools--Extension 中看不到了。IDE里也看不到,不能使用
重新安裝UnrealVS,提示:
"The extension is already installed to all applicable products'
如果裝了微軟的插件開發(fā)包,卸載微軟插件開發(fā)包,就正常了。
遠離微軟,珍愛生命!
在組件中打印調試屏幕信息
AHUD::OnShowDebugInfo.AddStatic(&UAbilitySystemComponent::OnShowDebugInfo);只有動態(tài)廣播代理才可以在BP中訪問
非動態(tài)代理如果加UPROPERTY(BlueprintAssignable) 修飾編譯報錯:error : Unrecognized type 'FCooldownEffectAppliedDelegate_Native' - type must be a UCLASS, USTRUCT or UENUM
DebugGame Editor 調試無法斷點
刪除生成的dll可以解決,例如直接刪除目錄 Binaries\Win64HP Bar方案
DebugGame 模式下頻繁修改和編譯某個文件出現(xiàn)編譯卡死
這種情況,切換到Development Editor下,就好了。版本4.18。自定義VS版本
方法一,在配置文件中設置:/Config/DefaultEditorSettings.ini
[/Script/SourceCodeAccess.SourceCodeAccessSettings]
PreferredAccessor=VisualStudio2017
方法二:在編輯器中設置
烏龜GIT跳過代理
Settings -> Network -> Enable Proxy Server 選中后再取消,再點應用被河蟹的Grandle的蛋
新版4.20 android打包時,提示正在下載gradle-4.1-all.zip,然后就開在哪里了。解決一:禁用grandle:Project Settings/Platforms/Android/APK Packaging/Enable Grandle Instead of Ant --> Flase
BP中節(jié)點沒有執(zhí)行連線
兩種情形,節(jié)點沒有執(zhí)行連線,表現(xiàn)為和變量一樣getOpengles 3.1 skinning骨骼數限制75
如何是好Delicated Server啟動的蛋
都好了后,服務器啟動不起來。后來發(fā)現(xiàn),要Package Projects生成WIN64的客戶端后,將Server放在Binaries\Win64下Joystick的淡
在編輯器模式下,如果用DS模式運行多個客戶端,則只有第一個客戶端的Joystick是正常的,其他都控制到第一個客戶端去了。4.19和4.21都有這個BUG.APlayerController.SetPawn重載問題
SetPawn重載后不被調用,百思不得其解VS2017編譯UE4.22的蛋蛋
每次都提示錯誤:Setting up Unreal Engine 4 project files...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1179,5):
error MSB3644: 未找到框架“.NETFramework,Version=v4.6.2”的引用程序集。若要解決此問題,請安裝此框架版本的 SDK 或 Targeting Pack,
或將應用程序的目標重新指向已裝有 SDK 或 Targeting Pack 的框架版本。請注意,將從全局程序集緩存(GAC)解析程序集,并將使用這些程序集替換引用程序集。
因此,程序集的目標可能未正確指向您所預期的框架。 [G:\Unreal\UE4.22\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.
解決
下載.Net 4.6.2,安裝或已安裝選擇修復。
https://dotnet.microsoft.com/download/visual-studio-sdks
蛋:
已經安裝了這個版本,但是還是提示錯誤。直接打開UnrealBuildTool.csproj工程,VS會提示沒有這個版本,選擇下載安裝跳到微軟的下載網站。 修復一下就好了。
SObjectWidget回收的蛋
蛋:You may just be holding onto some slate pointers on an actor that don't get reset until the actor is Garbage Collected. You should avoid doing this, and instead reset those references when the actor is Destroyed. [2019.09.08-07.22.53:693][667]LogOutputDevice: Error: Ensure condition failed: !IsGarbageCollecting() [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\UMG\Private\Slate\SObjectWidget.cpp] [Line: 43]
解決:
在Actor(例如PC,Character等)的BenginPlay中創(chuàng)建了UMG,需要在EndPlay的時候銷毀掉。
VS2019升級到4.25出現(xiàn)“chcp 65001 >NUL”錯誤的蛋
蛋:Creating makefile for YoursEditor (no existing makefile)
由于 Exception.ToString() 失敗,因此無法打印異常字符串。
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5):
error MSB3073: The command "chcp 65001 >NUL && "D:\Program Files\Epic Games\UE_4.25\Engine\Build\BatchFiles\Build.bat"
YoursEditor Win64 Development -Project="F:\UE\AbilitySystem\GameAbility_gitee\Yours.uproject" -WaitMutex -FromMsBuild" exited with code -532462766.
Done building project "Yours.vcxproj" -- FAILED.
解決:
找到工程下的中文路徑,刪改之。如果有git,則需要刪除中文明后提交,避免本地git緩存中也包含了這個中文名。
扯蛋:
之前的4.19沒有這個問題,到4.25就突然這樣了。網上說是VS2019的問題,幾個月了都不見修復