UE4 虚幻4无右键菜单.uproject文件无关联解决
在特定情况下,鼠标点击.uproject文件右键菜单消失。会造成比如:
1。无法手动生成VisualStudioProjectFiles。
2。无法切换UE4各个版本,从而导致版本错开崩溃、每次开启项目自动生成格外副本工程 等问题。
搜遍了全网+自己实验,总结解决方法如下:
一、被win10默认防护、其他杀毒软件删除
关闭/卸载杀毒软件、关闭win10防护
以win10防护为例,打开 windows安全中心,
分别关闭 病毒和威胁防护、防火墙和网络保护、 应用和浏览控制
二、删除注册表,运行CMD
1.删除注册表
1)按下 Ctrl+R 输入 regegit 调出注册表
2)删除 HKEY_CLASSES_ROOT 下的 .uproject文件夹
2.创建cmd并运行重启
新建一个文本文档,然后改名为 UnrealProjectMenuRegistration.cmd,复制如下代码
:: UnrealProjectMenuRegistration.cmd :: :: This batch file will try to find where the Unreal Engine is installed, then update your registry :: to register the Unreal Project File type (and its right click menu for things such as generating :: Visual Studio project files, and launching) :: :: Run as an Administrator, as it&#39;s required for writing to HKLM. :: :: Author: David Moore <david@sadrobot.co.nz>@ECHO OFFecho. echo Locating where Unreal Engine is installed by checking the Windows registry...::FOR /F &#34;tokens=2*&#34; %%A IN (&#39;reg query &#34;HKLM\SOFTWARE\EpicGames\Unreal Engine&#34; /v &#34;INSTALLDIR&#34;&#39;) DO ( :: SET &#34;UnrealEngineDir=%%B&#34; ::):: 设置为当前虚幻引擎安装目录 SET UnrealEngineDir=D:\Epic Games\IF &#34;%UnrealEngineDir%&#34;==&#34;&#34; GOTO CannotFindUnrealEngineecho. echo Using Unreal Engine directory: %UnrealEngineDir%set LauncherPath=%UnrealEngineDir%Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exeecho. echo Adding registry keys for the Unreal Project right click menu...:: HKLM\SOFTWARE\Classes\.uproject reg ADD &#34;HKLM\Software\Classes\.uproject&#34; /ve /d Unreal.ProjectFile /f IF ERRORLEVEL 1 ( echo Couldn&#39;t write to registry. Did you forget to run this batch file as an administrator? goto TheEnd ):: HKLM\SOFTWARE\Classes\Unreal.ProjectFile reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile&#34; /ve /d &#34;Unreal Engine Project File&#34; /f:: HKLM\SOFTWARE\Classes\Unreal.ProjectFile\DefaultIcon reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\DefaultIcon&#34; /ve /d &#34;\&#34;%LauncherPath%\&#34;&#34; /f:: HKLM\SOFTWARE\Classes\Unreal.ProjectFile\shell\open reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\open&#34; /ve /d &#34;Open&#34; /f reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\open\command&#34; /ve /d &#34;\&#34;%LauncherPath%\&#34; /editor \&#34;%%1\&#34;&#34; /f:: HKLM\SOFTWARE\Classes\Unreal.ProjectFile\shell\run reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\run&#34; /ve /d &#34;Launch game&#34; /f reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\run&#34; /v Icon /t REG_SZ /d &#34;\&#34;%LauncherPath%\&#34;&#34; /f reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\run\command&#34; /ve /d &#34;\&#34;%LauncherPath%\&#34; /game \&#34;%%1\&#34;&#34; /f:: HKLM\SOFTWARE\Classes\Unreal.ProjectFile\shell\rungenproj reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\rungenproj&#34; /ve /d &#34;Generate Visual Studio project files&#34; /f reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\rungenproj&#34; /v Icon /t REG_SZ /d &#34;\&#34;%LauncherPath%\&#34;&#34; /f reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\rungenproj\command&#34; /ve /d &#34;\&#34;%LauncherPath%\&#34; /projectfiles \&#34;%%1\&#34;&#34; /f:: HKLM\SOFTWARE\Classes\Unreal.ProjectFile\shell\switchversion reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\switchversion&#34; /ve /d &#34;Switch Unreal Engine version...&#34; /f reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\switchversion&#34; /v Icon /t REG_SZ /d &#34;\&#34;%LauncherPath%\&#34;&#34; /f reg ADD &#34;HKLM\Software\Classes\Unreal.ProjectFile\shell\switchversion\command&#34; /ve /d &#34;\&#34;%LauncherPath%\&#34; /switchversion \&#34;%%1\&#34;&#34; /f:Done echo. echo Done. echo. goto TheEnd:CannotFindUnrealEngine echo. echo DOH! Can&#39;t find the Unreal Engine. echo. goto TheEnd:TheEnd pause
修改 SET UnrealEngineDir=D:\Epic Games\
修改为Unreal Engine的路径(是UnrealEngine 的路径不是EpicLauncher的)
SET UnrealEngineDir=D:\Epic Games\
保存,右键以管理员身份运行,重启电脑即可。
三、重启后运行UnrealVersionSelector.exe
如,方法一、方法二都失效是使用下述方法:
1.找到Epic Game Lancher的安装目录,在lancher->Engine->Binaries->Win64->UnrealVersionSelector.exe
2.把UnrealVersionSelector.exe 分别拷贝到UE4 不同版本引擎的 Engine->Binaries->Win64目录,例如UE_4.25->Engine->Binaries->Win64
3.双击,以管理员身份运行UnrealVersionSelector.exe,重启电脑即可。
页:
[1]