Download Gallery/Plugins/Developer/RiderLink/Source/RiderDebuggerSupport/Private/UnrealFunctions.cpp from alexlu2/uassets: direct link, hf CLI and curl.
- Browser
- Download file 1.69 kB
-
https://huggingface.co/datasets/alexlu2/uassets/resolve/main/Gallery/Plugins/Developer/RiderLink/Source/RiderDebuggerSupport/Private/UnrealFunctions.cpp
- Command line
-
hf download hf://datasets/alexlu2/uassets/Gallery/Plugins/Developer/RiderLink/Source/RiderDebuggerSupport/Private/UnrealFunctions.cpp
-
curl -L -o UnrealFunctions.cpp https://huggingface.co/datasets/alexlu2/uassets/resolve/main/Gallery/Plugins/Developer/RiderLink/Source/RiderDebuggerSupport/Private/UnrealFunctions.cpp
1.69 kB
| | |
| UClass* RiderDebuggerSupport::FindClassForNode(const UObject* Object, const UFunction* Function) | |
| { | |
| if (nullptr != Function) return Function->GetOwnerClass(); | |
| if (nullptr != Object) return Object->GetClass(); | |
| return nullptr; | |
| } | |
| UEdGraphNode* RiderDebuggerSupport::FindSourceNodeForCodeLocation(const UObject* Object, UFunction* Function) | |
| { | |
| if (nullptr == Object) return nullptr; | |
| if (UBlueprintGeneratedClass* Class = Cast<UBlueprintGeneratedClass>(FindClassForNode(Object, Function))) | |
| { | |
| return Class->GetDebugData(). | |
| FindSourceNodeFromCodeLocation(Function, 0, true); | |
| } | |
| return nullptr; | |
| } | |
| FString RiderDebuggerSupport::GetClassNameWithoutSuffix(const UClass* Class) | |
| { | |
| FString Result = TEXT("Null"); | |
| if (nullptr == Class) return Result; | |
| Result = Class->GetName(); | |
| if (nullptr != Class->ClassGeneratedBy) | |
| { | |
| Result.RemoveFromEnd(TEXT("_C"), ESearchCase::CaseSensitive); | |
| } | |
| return Result; | |
| } | |
| const UClass* RiderDebuggerSupport::CastToUClass(const UObject* Object) | |
| { | |
| if (nullptr == Object) return nullptr; | |
| const auto& TypeOfObject = Object->GetClass(); | |
| if (nullptr == TypeOfObject) return nullptr; | |
| const auto& TypeOfTypeOfObject = TypeOfObject->GetClass(); | |
| if (nullptr == TypeOfTypeOfObject) return nullptr; | |
| const auto& TypeOfClass = TypeOfTypeOfObject->GetClass(); | |
| if (nullptr == TypeOfClass) return nullptr; | |
| if (TypeOfClass != TypeOfTypeOfObject) return nullptr; | |
| return static_cast<const UClass*>(Object); | |
| } |