What It Means & How to Fix It
🧠 Why You’re Seeing This Error
C2328 means you’re trying to call a function on a class or struct, but the compiler can’t find that function. In other words:
“This function doesn’t exist on the type you’re calling it on.”
In UE5, this usually happens when:
- You call a function that doesn’t exist on a given type (typo, wrong object, wrong return type)
- You assume a type has a method (like
ToString()
orGetName()
), but it doesn’t - You call a Blueprint-only function from C++ (it has no C++ implementation)
- You forget to include a header where the method is declared
💥 Example Error Message
error C2328: 'ToString' : function does not exist on 'FVector'
🛠️ Example Code
FVector Location = GetActorLocation();
FString Text = Location.ToStringWithUnits(); // ❌ C2328: no such method
✅ How to Fix C2328 in UE5 – Step-by-Step
✔️ 1. Double-Check the Method Name and Type
Not every type in UE5 has the same utility methods.
Fix:
FString Text = Location.ToString(); // ✅ This one exists for FVector
✔️ 2. Make Sure You’re Calling It on the Right Type
Sometimes you think you’re calling a function on one class, but it’s actually on a different return type.
Wrong:
UWorld* World = GetWorld();
FString Name = World->GetNameText(); // ❌ C2328: no such function
Fix:
FString Name = World->GetName(); // ✅
✔️ 3. If It’s a BlueprintCallable, Make Sure It’s Implemented in C++
Just because something exists in Blueprint doesn’t mean you can call it from C++. You may need to implement it yourself in C++ and mark it BlueprintCallable
.
✔️ 4. Include the Correct Header
If the function is part of a class you’ve forward-declared, you may need to #include
its full header for the method to be visible.
✅ Summary: How to Fix C2328 in UE5
Cause | Fix Example |
---|---|
Calling a method that doesn’t exist | Check if that method is defined on the type |
Typo or wrong method name | Double-check spelling (ToString , not to_string ) |
Calling Blueprint-only function | Implement it in C++ if you want to call it there |
Missing include for method | Add the correct header for full method access |