本文整理汇总了C++中UObject::ConditionalPostLoad方法的典型用法代码示例。如果您正苦于以下问题:C++ UObject::ConditionalPostLoad方法的具体用法?C++ UObject::ConditionalPostLoad怎么用?C++ UObject::ConditionalPostLoad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UObject
的用法示例。
在下文中一共展示了UObject::ConditionalPostLoad方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PostLoad
void UNavCollision::PostLoad()
{
Super::PostLoad();
// Our owner needs to be post-loaded before us else they may not have loaded
// their data yet.
UObject* Outer = GetOuter();
if (Outer)
{
Outer->ConditionalPostLoad();
UStaticMesh* StaticMeshOuter = Cast<UStaticMesh>(Outer);
if (StaticMeshOuter != NULL)
{
Setup(StaticMeshOuter->BodySetup);
}
}
}
示例2: Apply
//! @brief Apply this preset to a graph instance
//! @param graph The target graph instance to apply this preset
//! @param mode Reset to default other inputs of merge w/ previous values
//! @return Return true whether at least one input value is applied
bool FPreset::Apply(graph_inst_t* Instance, FPreset::ApplyMode mode) const
{
bool AtLeastOneSet = false;
graph_desc_t* Desc = Instance->Desc;
for(int32 Idx = 0 ; Idx < mInputValues.Num() ; ++Idx)
{
const FInputValue& inp_value = mInputValues[Idx];
// lookup by Input UID
TSharedPtr<input_inst_t> inp_found =
FindInput(Instance->Inputs, inp_value.mUid);
// or by input identifier if no match was found
if (!inp_found.Get())
{
inp_found =
FindInput(Instance->Inputs, inp_value.mUid);
}
if (inp_found.Get() &&
inp_found->Type == inp_value.mType)
{
// Process only numerical (additional check)
if (inp_found->IsNumerical())
{
TArray<FString> StrValueArray;
inp_value.mValue.ParseIntoArray(StrValueArray,TEXT(","), true);
TArray<float> ValueArray;
for (TArray<FString>::TIterator ItV(StrValueArray); ItV; ++ItV)
{
ValueArray.Add(FCString::Atof(*(* ItV)));
}
Instance->UpdateInput(inp_found->Uid, ValueArray);
AtLeastOneSet = true;
}
else
{
if (inp_value.mValue != FString(TEXT("NULL")))
{
UObject* Object = FindObject<UTexture2D>(NULL, *inp_value.mValue);
if (!Object)
{
Object = FindObject<USubstanceImageInput>(NULL, *inp_value.mValue);
}
if (Object)
{
Object->ConditionalPostLoad();
Instance->UpdateInput(inp_found->Uid, Object);
}
/*else
{
debugf(
TEXT("Unable to restore graph instance image input, object not found: %s"),
*inp_value.mValue);
}*/
}
else
{
Instance->UpdateInput(inp_found->Uid, NULL);
}
}
}
}
if (AtLeastOneSet)
{
Instance->ParentInstance->MarkPackageDirty();
}
return AtLeastOneSet;
}
示例3: PostLoad
void UBodySetup::PostLoad()
{
Super::PostLoad();
// Our owner needs to be post-loaded before us else they may not have loaded
// their data yet.
UObject* Outer = GetOuter();
if (Outer)
{
Outer->ConditionalPostLoad();
}
if ( GetLinkerUE4Version() < VER_UE4_BUILD_SCALE_VECTOR )
{
BuildScale3D = FVector( BuildScale_DEPRECATED );
}
DefaultInstance.FixupData(this);
if ( GetLinkerUE4Version() < VER_UE4_REFACTOR_PHYSICS_BLENDING )
{
if ( bAlwaysFullAnimWeight_DEPRECATED )
{
PhysicsType = PhysType_Simulated;
}
else if ( DefaultInstance.bSimulatePhysics == false )
{
PhysicsType = PhysType_Kinematic;
}
else
{
PhysicsType = PhysType_Default;
}
}
if ( GetLinkerUE4Version() < VER_UE4_BODYSETUP_COLLISION_CONVERSION )
{
if ( DefaultInstance.GetCollisionEnabled() == ECollisionEnabled::NoCollision )
{
CollisionReponse = EBodyCollisionResponse::BodyCollision_Disabled;
}
}
// Compress to whatever formats the active target platforms want
ITargetPlatformManagerModule* TPM = GetTargetPlatformManager();
if (TPM)
{
const TArray<ITargetPlatform*>& Platforms = TPM->GetActiveTargetPlatforms();
for (int32 Index = 0; Index < Platforms.Num(); Index++)
{
GetCookedData(Platforms[Index]->GetPhysicsFormat(this));
}
}
// make sure that we load the physX data while the linker's loader is still open
CreatePhysicsMeshes();
// fix up invalid transform to use identity
// this can be here because BodySetup isn't blueprintable
if ( GetLinkerUE4Version() < VER_UE4_FIXUP_BODYSETUP_INVALID_CONVEX_TRANSFORM )
{
for (int32 i=0; i<AggGeom.ConvexElems.Num(); ++i)
{
if ( AggGeom.ConvexElems[i].GetTransform().IsValid() == false )
{
AggGeom.ConvexElems[i].SetTransform(FTransform::Identity);
}
}
}
}