MCPcopy Create free account
hub / github.com/Tencent/UnLua / BuildFromUStruct

Method BuildFromUStruct

Plugins/UnLua/Source/UnLua/Private/UnLuaDebugBase.cpp:311–342  ·  view source on GitHub ↗

* Build value based on a UStruct */

Source from the content-addressed store, hash-verified

309 * Build value based on a UStruct
310 */
311 void FLuaDebugValue::BuildFromUStruct(UStruct *Struct, void *ContainerPtr, UObjectBaseUtility *ContainerObject)
312 {
313 if (!Struct || !ContainerPtr)
314 {
315 return;
316 }
317
318 if (ContainerObject && ContainerObject->HasAnyFlags(RF_NeedInitialization))
319 {
320 return;
321 }
322
323 for (FProperty *Property = Struct->PropertyLink; Property; Property = Property->PropertyLinkNext)
324 {
325 // filter out deprecated FProperty
326 if (Property->HasAnyPropertyFlags(CPF_Deprecated))
327 {
328 continue;
329 }
330
331 FLuaDebugValue *Key = AddKey();
332 if (Key)
333 {
334 Key->ReadableValue = Property->GetNameCPP();
335 }
336 FLuaDebugValue *Value = AddValue();
337 if (Value)
338 {
339 Value->BuildFromUProperty(Property, Property->ContainerPtrToValuePtr<void>(ContainerPtr));
340 }
341 }
342 }
343
344 /**
345 * Build value based on a TArray

Callers

nothing calls this directly

Calls 1

BuildFromUPropertyMethod · 0.80

Tested by

no test coverage detected