본문 바로가기
Unreal Engine4 or 5/Debugging

Property Type, Name, Function Name 확인 및 실행

by 눈야옹 2019. 1. 1.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
for (TFieldIterator<UProperty> It(ClassInfo1); It; ++It)
    {
        //Property 이름, 종류 출력
        AB_LOG(Warning, TEXT("Field : %s, Type : %s"), *It->GetName(), *It->GetClass()->GetName());
        UStrProperty* StrProp = FindField<UStrProperty>(ClassInfo1, *It->GetName());
 
        if (StrProp)
        {
            //Property에 할당된 값 출력
            AB_LOG(Warning, TEXT("Value = %s"), *StrProp->GetPropertyValue_InContainer(WebConnection));
        }
 
    }
 
    for (const auto& Entry : ClassInfo1->NativeFunctionLookupTable)
    {
        //Function 이름 출력
        AB_LOG(Warning, TEXT("Function = %s"), *Entry.Name.ToString());
        UFunction* Func1 = ClassInfo1->FindFunctionByName(Entry.Name);
        if (Func1->ParmsSize == 0)
        {
            //Function 실행
            WebConnection->ProcessEvent(Func1, NULL);
        }
    }
cs