使用 “+” 来进行字符串拼接,使用Append会出现多个“\0”的情况。
推荐:
FString imgPath = "hello.jpg";
FString fullImgPath = FPaths::ProjectContentDir() + imgPath;
不推荐:
FString imgPath = "hello.jpg";
FString fullImgPath = FPaths::ProjectContentDir().Append(imgPath);
使用 “+” 来进行字符串拼接,使用Append会出现多个“\0”的情况。
推荐:
FString imgPath = "hello.jpg";
FString fullImgPath = FPaths::ProjectContentDir() + imgPath;
不推荐:
FString imgPath = "hello.jpg";
FString fullImgPath = FPaths::ProjectContentDir().Append(imgPath);