/** * Serialize the given FName as an FString */ FArchive& FNameAsStringProxyArchive::operator<<( class FName& N ) { if (IsLoading()) { FString LoadedString; InnerArchive << LoadedString; N = FName(*LoadedString); } else { FString SavedString(N.ToString()); InnerArchive << SavedString; } return *this; }
/** * Serialize the given UObject* as an FString */ FArchive& FObjectAndNameAsStringProxyArchive::operator<<(class UObject*& Obj) { if (IsLoading()) { // load the path name to the object FString LoadedString; InnerArchive << LoadedString; // look up the object by fully qualified pathname Obj = FindObject<UObject>(NULL, *LoadedString, false); // If we couldn't find it, and we want to load it, do that if((Obj == NULL) && bLoadIfFindFails) { Obj = LoadObject<UObject>(NULL, *LoadedString); } } else { // save out the fully qualified object name FString SavedString(Obj->GetPathName()); InnerArchive << SavedString; } return *this; }