#include "CoreMinimal.h" void DemoFunction(FName MyName) { if (MyName.IsNone()) { UE_LOG(LogTemp, Warning, TEXT("MyName is set to None")); } else { UE_LOG(LogTemp, Warning, TEXT("MyName is set to %s"), *MyName.ToString()); } } int main() { DemoFunction(FName(TEXT("John"))); DemoFunction(FName()); return 0; }In the above code, we have defined a function called DemoFunction that takes an FName parameter called MyName. The function checks if MyName is set to None or not using the IsNone function. If MyName is None, it logs a warning message to the console. Otherwise, it logs the value of MyName to the console. The FName IsNone function is a part of the Core package library in Unreal Engine.