해결된 질문
작성
·
888
0
안녕하세요. 질문 드리기 앞서 감사 인사를 전하고 싶습니다. 저 같은 초보도 이해가 잘되고 쉽게
배울 수 있는 양질의 강의를 저렴한 값에 제공 해주셔서 감사합니다.
Build started...
1>------ Build started: Project: Study, Configuration: Development_Editor x64 ------
2>------ Skipped Build: Project: UE5, Configuration: BuiltWithUnrealBuildTool Win64 ------
2>Project not selected to build for this solution configuration
1>Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" StudyEditor Win64 Development -Project="C:\Users\leehy\Documents\Unreal Projects\Study\Study.uproject" -WaitMutex -FromMsBuild
1>Log file: C:\Users\leehy\AppData\Local\UnrealBuildTool\Log.txt
1>Building StudyEditor...
1>Using Visual Studio 2022 14.33.31631 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>Determining max actions to execute in parallel (8 physical cores, 16 logical cores)
1> Executing up to 8 processes, one per physical core
1>Building 4 actions with 4 processes...
1>[1/4] Link UnrealEditor-Study.lib cancelled
1>[2/4] WriteMetadata StudyEditor.target cancelled
1>[3/4] Link UnrealEditor-Study.dll cancelled
1>[4/4] Compile PlayerCharacter.cpp
1>C:\UE_5.1\Engine\Source\Runtime\Core\Public\Containers\UnrealString.h(1241): error C2338: static_assert failed: 'Formatting string must be a TCHAR array.'
1>C:\Users\leehy\Documents\Unreal Projects\Study\Source\Study\PlayerCharacter.cpp(221): note: see reference to function template instantiation 'FString FString::Printf<int32,>(const FmtType &)' being compiled
1> with
1> [
1> FmtType=int32
1> ]
1>C:\UE_5.1\Engine\Source\Runtime\Core\Public\Containers\UnrealString.h(1240): warning C4312: 'type cast': conversion from 'const FmtType' to 'const TCHAR *' of greater size
1> with
1> [
1> FmtType=int32
1> ]
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "C:\UE_5.1\Engine\Build\BatchFiles\Build.bat StudyEditor Win64 Development -Project="C:\Users\leehy\Documents\Unreal Projects\Study\Study.uproject" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "Study.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========
========== Build started at 11:31 PM and took 03.141 seconds ==========
PlayerCharacter.cpp(221) 에서 오류가 있는데요. FString::Printf 로 섹션 이름과 번호를 가져오는
부분에서 잘 안되는 것 같습니다.
언리얼 개발자를 꿈꾸게 된 계기는 모두 이득우님 덕분입니다. 항상 감사드립니다.
void APlayerCharacter::ComboCheck()
{
ComboTimerHandle.Invalidate();
if (HasNextComboCommand)
{
UAnimInstance* AnimIntance = GetMesh()->GetAnimInstance();
CurrentCombo = FMath::Clamp(CurrentCombo + 1, 1, ComboActionData->MaxComboCount);
FName NextSection = *FString::Printf((TEXT("%s %d"), *ComboActionData->MontageSectionName, CurrentCombo));
AnimIntance->Montage_JumpToSection(NextSection, ComboAttackMontage);
SetComboCheckTimer();
HasNextComboCommand = false;
}
}
답변 1
0
*FString::Printf((TEXT("%s %d"), *ComboActionData->MontageSectionName, CurrentCombo));
이 부분에서 괄호가 두 개 들어갔네요.
*FString::Printf(TEXT("%s%d"), *ComboActionData->MontageSectionNamePrefix, CurrentCombo);
이렇게 인자를 세 개 넣어주어야 합니다.
컴파일 문제가 발생하면 깃헙 소스 비교해보면서 진행해주시면 좋을 것 같아요.
링크 : https://github.com/ideugu/UnrealProgrammingPart2/blob/5/Source/ArenaBattle/Character/ABCharacterBase.cpp