【问题标题】:Restricted folder names in Unreal虚幻中的受限文件夹名称
【发布时间】:2020-05-01 03:35:31
【问题描述】:
在 Unreal 4.23 中,我在创建项目的 Android 版本时遇到了这个错误:
UATHelper:打包(Android (ASTC)):错误:以下文件设置为暂存,但包含受限文件夹名称(“IOS”):
还有:
UATHelper:打包(Android (ASTC)):错误:以下文件设置为暂存,但包含受限文件夹名称(“Apple”):
是否有明显需要避免的受限单词和文件夹名称列表。喜欢iOS还是IOS?反对派的签证呢?
是时候进行一些创造性的重新拼写了,有人吗?
【问题讨论】:
标签:
android
ios
namespaces
unreal-engine4
【解决方案1】:
虚幻 4.25 对其内部限制和可能的解决方案有更多的了解。
我们的项目中有一个 /Windows 目录,UE 在 Xbox 上抱怨它。由于我不想将其重命名为“HolesInTheWalls”或其他名称,因此我使用了白名单选项,瞧,它工作正常。
这是 UE 在烹饪过程中打印的内容:
[Restrictions]
Win32
Win64
HoloLens
Mac
XboxOne
PS4
IOS
Android
HTML5
Linux
LinuxAArch64
AllDesktop
TVOS
Switch
Lumin
PS5
WinGDK
XboxOneGDK
Windows
Apple
Unix
Sony
Desktop
EpicInternal
CarefullyRedist
NotForLicensees
NoRedist
If these files are intended to be distributed in packaged builds,
move the source files out of a restricted folder, or remap
them during staging using the following syntax in DefaultGame.ini:
[Staging]
+RemapDirectories=(From="Foo/NoRedist", To="Foo")
Alternatively, whitelist them using this syntax in DefaultGame.ini:
[Staging]
+WhitelistDirectories=MyGame/Content/Foo
【解决方案2】:
该特定错误消息来自虚幻自动化工具,并通过挖掘该程序的引擎源,找到要从中生成的受限文件夹名称
// Build a list of restricted folder names. This will comprise all other restricted platforms, plus standard restricted folder names such as NoRedist, NotForLicensees, etc...
RestrictedFolderNames.UnionWith(PlatformExports.GetPlatformFolderNames());
foreach(UnrealTargetPlatform StagePlatform in StageTargetPlatform.GetStagePlatforms())
{
RestrictedFolderNames.ExceptWith(PlatformExports.GetIncludedFolderNames(StagePlatform));
}
RestrictedFolderNames.UnionWith(RestrictedFolder.GetNames());
RestrictedFolderNames.Remove(StageTargetPlatform.IniPlatformType.ToString());
名称包括:
- NotForLicensees
- 禁止编辑
- 仔细重新编排
- EpicInternal
- PS4
- XboxOne
- 开关
- 鹌鹑
- 平台上标记为“机密”的任何平台文件夹名称。
- 当前未暂存的任何平台名称。