本文整理汇总了C++中ensureMsgf函数的典型用法代码示例。如果您正苦于以下问题:C++ ensureMsgf函数的具体用法?C++ ensureMsgf怎么用?C++ ensureMsgf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ensureMsgf函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetPreallocationInfo
void UGameplayCueManager::UpdatePreallocation(UWorld* World)
{
FPreallocationInfo& Info = GetPreallocationInfo(World);
if (Info.ClassesNeedingPreallocation.Num() > 0)
{
AGameplayCueNotify_Actor* CDO = Info.ClassesNeedingPreallocation.Last();
TArray<AGameplayCueNotify_Actor*>& PreallocatedList = Info.PreallocatedInstances.FindOrAdd(CDO->GetClass());
AGameplayCueNotify_Actor* PrespawnedInstance = Cast<AGameplayCueNotify_Actor>(World->SpawnActor(CDO->GetClass()));
ensureMsgf(PrespawnedInstance, TEXT("Failed to prespawn GC notify for: %s"), *GetNameSafe(CDO));
ensureMsgf(PrespawnedInstance->IsPendingKill() == false, TEXT("Newly spawned GC is PendingKILL: %s"), *GetNameSafe(CDO));
if (PrespawnedInstance)
{
if (LogGameplayCueActorSpawning)
{
ABILITY_LOG(Warning, TEXT("Prespawning GC %s"), *GetNameSafe(CDO));
}
PrespawnedInstance->bInRecycleQueue = true;
PreallocatedList.Push(PrespawnedInstance);
PrespawnedInstance->SetActorHiddenInGame(true);
if (PreallocatedList.Num() >= CDO->NumPreallocatedInstances)
{
Info.ClassesNeedingPreallocation.Pop(false);
}
}
}
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:30,代码来源:GameplayCueManager.cpp
示例2: Modify
void UEdGraphPin::MakeLinkTo(UEdGraphPin* ToPin)
{
Modify();
if (ToPin != NULL)
{
ToPin->Modify();
// Make sure we don't already link to it
if (!LinkedTo.Contains(ToPin))
{
UEdGraphNode* MyNode = GetOwningNode();
// Check that the other pin does not link to us
ensureMsgf(!ToPin->LinkedTo.Contains(this), *GetLinkInfoString( LOCTEXT("MakeLinkTo", "MakeLinkTo").ToString(), LOCTEXT("IsLinked", "is linked with pin").ToString(), ToPin));
ensureMsgf(MyNode->GetOuter() == ToPin->GetOwningNode()->GetOuter(), *GetLinkInfoString( LOCTEXT("MakeLinkTo", "MakeLinkTo").ToString(), LOCTEXT("OuterMismatch", "has a different outer than pin").ToString(), ToPin)); // Ensure both pins belong to the same graph
// Add to both lists
LinkedTo.Add(ToPin);
ToPin->LinkedTo.Add(this);
GraphPinHelpers::EnableAllConnectedNodes(MyNode);
GraphPinHelpers::EnableAllConnectedNodes(ToPin->GetOwningNode());
}
}
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:26,代码来源:EdGraphPin.cpp
示例3: checkf
void FComponentSpacePoseLink::EvaluateComponentSpace(FComponentSpacePoseContext& Output)
{
#if DO_CHECK
checkf( !bProcessed, TEXT( "EvaluateComponentSpace already in progress, circular link for AnimInstance [%s] Blueprint [%s]" ), \
*Output.AnimInstanceProxy->GetAnimInstanceName(), *GetFullNameSafe(IAnimClassInterface::GetActualAnimClass(Output.AnimInstanceProxy->GetAnimClassInterface())));
TGuardValue<bool> CircularGuard(bProcessed, true);
#endif
#if ENABLE_ANIMGRAPH_TRAVERSAL_DEBUG
checkf(InitializationCounter.IsSynchronizedWith(Output.AnimInstanceProxy->GetInitializationCounter()), TEXT("Calling EvaluateComponentSpace without initialization!"));
checkf(CachedBonesCounter.IsSynchronizedWith(Output.AnimInstanceProxy->GetCachedBonesCounter()), TEXT("Calling EvaluateComponentSpace without CachedBones!"));
checkf(UpdateCounter.IsSynchronizedWith(Output.AnimInstanceProxy->GetUpdateCounter()), TEXT("Calling EvaluateComponentSpace without Update for this node!"));
EvaluationCounter.SynchronizeWith(Output.AnimInstanceProxy->GetEvaluationCounter());
#endif
if (LinkedNode != NULL)
{
LinkedNode->EvaluateComponentSpace(Output);
#if WITH_EDITOR
Output.AnimInstanceProxy->RegisterWatchedPose(Output.Pose, LinkID);
#endif
}
else
{
//@TODO: Warning here?
Output.ResetToRefPose();
}
// Detect non valid output
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
if (Output.ContainsNaN())
{
// Show bone transform with some useful debug info
for (const FTransform& Bone : Output.Pose.GetPose().GetBones())
{
if (Bone.ContainsNaN())
{
ensureMsgf(!Bone.ContainsNaN(), TEXT("Bone transform contains NaN from AnimInstance:[%s] Node:[%s] Value:[%s]")
, *Output.AnimInstanceProxy->GetAnimInstanceName(), LinkedNode ? *LinkedNode->StaticStruct()->GetName() : TEXT("NULL"), *Bone.ToString());
}
}
}
if (!Output.IsNormalized())
{
// Show bone transform with some useful debug info
for (const FTransform& Bone : Output.Pose.GetPose().GetBones())
{
if (!Bone.IsRotationNormalized())
{
ensureMsgf(Bone.IsRotationNormalized(), TEXT("Bone Rotation not normalized from AnimInstance:[%s] Node:[%s] Value:[%s]")
, *Output.AnimInstanceProxy->GetAnimInstanceName(), LinkedNode ? *LinkedNode->StaticStruct()->GetName() : TEXT("NULL"), *Bone.ToString());
}
}
}
#endif
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:58,代码来源:AnimNodeBase.cpp
示例4: return
void FPrimitiveSceneInfo::GatherLightingAttachmentGroupPrimitives(TArray<FPrimitiveSceneInfo*, SceneRenderingAllocator>& OutChildSceneInfos)
{
#if ENABLE_NAN_DIAGNOSTIC
// local function that returns full name of object
auto GetObjectName = [](const UPrimitiveComponent* InPrimitive)->FString
{
return (InPrimitive) ? InPrimitive->GetFullName() : FString(TEXT("Unknown Object"));
};
// verify that the current object has a valid bbox before adding it
const float& BoundsRadius = this->Proxy->GetBounds().SphereRadius;
if (ensureMsgf(!FMath::IsNaN(BoundsRadius) && FMath::IsFinite(BoundsRadius),
TEXT("%s had an ill-formed bbox and was skipped during shadow setup, contact DavidH."), *GetObjectName(this->ComponentForDebuggingOnly)))
{
OutChildSceneInfos.Add(this);
}
else
{
// return, leaving the TArray empty
return;
}
#else
// add self at the head of this queue
OutChildSceneInfos.Add(this);
#endif
if (!LightingAttachmentRoot.IsValid() && Proxy->LightAttachmentsAsGroup())
{
const FAttachmentGroupSceneInfo* AttachmentGroup = Scene->AttachmentGroups.Find(PrimitiveComponentId);
if (AttachmentGroup)
{
for (int32 ChildIndex = 0, ChildIndexMax = AttachmentGroup->Primitives.Num(); ChildIndex < ChildIndexMax; ChildIndex++)
{
FPrimitiveSceneInfo* ShadowChild = AttachmentGroup->Primitives[ChildIndex];
#if ENABLE_NAN_DIAGNOSTIC
// Only enqueue objects with valid bounds using the normality of the SphereRaduis as criteria.
const float& ShadowChildBoundsRadius = ShadowChild->Proxy->GetBounds().SphereRadius;
if (ensureMsgf(!FMath::IsNaN(ShadowChildBoundsRadius) && FMath::IsFinite(ShadowChildBoundsRadius),
TEXT("%s had an ill-formed bbox and was skipped during shadow setup, contact DavidH."), *GetObjectName(ShadowChild->ComponentForDebuggingOnly)))
{
checkSlow(!OutChildSceneInfos.Contains(ShadowChild))
OutChildSceneInfos.Add(ShadowChild);
}
#else
// enqueue all objects.
checkSlow(!OutChildSceneInfos.Contains(ShadowChild))
OutChildSceneInfos.Add(ShadowChild);
#endif
}
}
}
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:57,代码来源:PrimitiveSceneInfo.cpp
示例5: GetOwner
void UActorComponent::PostInitProperties()
{
Super::PostInitProperties();
AActor* Owner = GetOwner();
ensureMsgf(Owner == NULL || Owner == GetOuter(), TEXT("Component %s is owned by %s by has an Outer of %s."), *GetName(), *Owner->GetName(), *GetOuter()->GetName());
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:7,代码来源:ActorComponent.cpp
示例6: if
//------------------------------------------------------------------------------
bool UBlueprintBoundEventNodeSpawner::IsBindingCompatible(UObject const* BindingCandidate) const
{
bool bMatchesNodeType = false;
if (NodeClass->IsChildOf<UK2Node_ComponentBoundEvent>())
{
UObjectProperty const* BindingProperty = Cast<UObjectProperty>(BindingCandidate);
bMatchesNodeType = (BindingProperty != nullptr);
}
else if (NodeClass->IsChildOf<UK2Node_ActorBoundEvent>())
{
bMatchesNodeType = BindingCandidate->IsA<AActor>();
}
const UMulticastDelegateProperty* Delegate = GetEventDelegate();
if ( !ensureMsgf(!FBlueprintNodeSpawnerUtils::IsStaleFieldAction(this),
TEXT("Invalid BlueprintBoundEventNodeSpawner (for %s). Was the action database properly updated when this class was compiled?"),
*Delegate->GetOwnerClass()->GetName()))
{
return false;
}
UClass* DelegateOwner = Delegate->GetOwnerClass()->GetAuthoritativeClass();
UClass* BindingClass = FBlueprintNodeSpawnerUtils::GetBindingClass(BindingCandidate)->GetAuthoritativeClass();
return bMatchesNodeType && BindingClass->IsChildOf(DelegateOwner) && !FObjectEditorUtils::IsVariableCategoryHiddenFromClass(Delegate, BindingClass);
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:28,代码来源:BlueprintBoundEventNodeSpawner.cpp
示例7: SortNotifies
void UAnimSequenceBase::RefreshCacheData()
{
#if WITH_EDITOR
SortNotifies();
for (int32 TrackIndex=0; TrackIndex<AnimNotifyTracks.Num(); ++TrackIndex)
{
AnimNotifyTracks[TrackIndex].Notifies.Empty();
}
for (int32 NotifyIndex = 0; NotifyIndex<Notifies.Num(); ++NotifyIndex)
{
int32 TrackIndex = Notifies[NotifyIndex].TrackIndex;
if (AnimNotifyTracks.IsValidIndex(TrackIndex))
{
AnimNotifyTracks[TrackIndex].Notifies.Add(&Notifies[NotifyIndex]);
}
else
{
// this notifyindex isn't valid, delete
// this should not happen, but if it doesn, find best place to add
ensureMsgf(0, TEXT("AnimNotifyTrack: Wrong indices found"));
AnimNotifyTracks[0].Notifies.Add(&Notifies[NotifyIndex]);
}
}
// notification broadcast
OnNotifyChanged.Broadcast();
#endif //WITH_EDITOR
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:30,代码来源:AnimSequenceBase.cpp
示例8: DECLARE_SCOPE_CYCLE_COUNTER
void FSlateRHIResourceManager::CreateTextures( const TArray< const FSlateBrush* >& Resources )
{
DECLARE_SCOPE_CYCLE_COUNTER(TEXT("Loading Slate Textures"), STAT_Slate, STATGROUP_LoadTime);
TMap<FName,FNewTextureInfo> TextureInfoMap;
const uint32 Stride = GPixelFormats[PF_R8G8B8A8].BlockBytes;
for( int32 ResourceIndex = 0; ResourceIndex < Resources.Num(); ++ResourceIndex )
{
const FSlateBrush& Brush = *Resources[ResourceIndex];
const FName TextureName = Brush.GetResourceName();
if( TextureName != NAME_None && !Brush.HasUObject() && !Brush.IsDynamicallyLoaded() && !ResourceMap.Contains(TextureName) )
{
// Find the texture or add it if it doesnt exist (only load the texture once)
FNewTextureInfo& Info = TextureInfoMap.FindOrAdd( TextureName );
Info.bSrgb = (Brush.ImageType != ESlateBrushImageType::Linear);
// Only atlas the texture if none of the brushes that use it tile it and the image is srgb
Info.bShouldAtlas &= ( Brush.Tiling == ESlateBrushTileType::NoTile && Info.bSrgb && AtlasSize > 0 );
// Texture has been loaded if the texture data is valid
if( !Info.TextureData.IsValid() )
{
uint32 Width = 0;
uint32 Height = 0;
TArray<uint8> RawData;
bool bSucceeded = LoadTexture( Brush, Width, Height, RawData );
Info.TextureData = MakeShareable( new FSlateTextureData( Width, Height, Stride, RawData ) );
const bool bTooLargeForAtlas = (Width >= 256 || Height >= 256 || Width >= AtlasSize || Height >= AtlasSize );
Info.bShouldAtlas &= !bTooLargeForAtlas;
if( !bSucceeded || !ensureMsgf( Info.TextureData->GetRawBytes().Num() > 0, TEXT("Slate resource: (%s) contains no data"), *TextureName.ToString() ) )
{
TextureInfoMap.Remove( TextureName );
}
}
}
}
// Sort textures by size. The largest textures are atlased first which creates a more compact atlas
TextureInfoMap.ValueSort( FCompareFNewTextureInfoByTextureSize() );
for( TMap<FName,FNewTextureInfo>::TConstIterator It(TextureInfoMap); It; ++It )
{
const FNewTextureInfo& Info = It.Value();
FName TextureName = It.Key();
FString NameStr = TextureName.ToString();
checkSlow( TextureName != NAME_None );
FSlateShaderResourceProxy* NewTexture = GenerateTextureResource( Info );
ResourceMap.Add( TextureName, NewTexture );
}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:60,代码来源:SlateRHIResourceManager.cpp
示例9: ensureMsgf
FPinConnectionResponse UEdGraphSchema::MovePinLinks(UEdGraphPin& MoveFromPin, UEdGraphPin& MoveToPin, bool bIsIntermediateMove) const
{
#if WITH_EDITOR
ensureMsgf(bIsIntermediateMove || !MoveToPin.GetOwningNode()->GetGraph()->HasAnyFlags(RF_Transient),
TEXT("When moving to an Intermediate pin, use FKismetCompilerContext::MovePinLinksToIntermediate() instead of UEdGraphSchema::MovePinLinks()"));
#endif // #if WITH_EDITOR
FPinConnectionResponse FinalResponse = FPinConnectionResponse(CONNECT_RESPONSE_MAKE, TEXT(""));
// First copy the current set of links
TArray<UEdGraphPin*> CurrentLinks = MoveFromPin.LinkedTo;
// Then break all links at pin we are moving from
MoveFromPin.BreakAllPinLinks();
// Try and make each new connection
for (int32 i=0; i<CurrentLinks.Num(); i++)
{
UEdGraphPin* NewLink = CurrentLinks[i];
FPinConnectionResponse Response = CanCreateConnection(&MoveToPin, NewLink);
if(Response.CanSafeConnect())
{
MoveToPin.MakeLinkTo(NewLink);
}
else
{
FinalResponse = Response;
}
}
// Move over the default values
MoveToPin.DefaultValue = MoveFromPin.DefaultValue;
MoveToPin.DefaultObject = MoveFromPin.DefaultObject;
MoveToPin.DefaultTextValue = MoveFromPin.DefaultTextValue;
return FinalResponse;
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:32,代码来源:EdGraphSchema.cpp
示例10: UE_CLOG
bool UObjectBaseUtility::IsA( const UClass* SomeBase ) const
{
UE_CLOG(!SomeBase, LogObj, Fatal, TEXT("IsA(NULL) cannot yield meaningful results"));
#if UCLASS_FAST_ISA_IMPL & 1
bool bOldResult = false;
for ( UClass* TempClass=GetClass(); TempClass; TempClass=TempClass->GetSuperClass() )
{
if ( TempClass == SomeBase )
{
bOldResult = true;
break;
}
}
#endif
#if UCLASS_FAST_ISA_IMPL & 2
bool bNewResult = GetClass()->IsAUsingFastTree(*SomeBase);
#endif
#if (UCLASS_FAST_ISA_IMPL & 1) && (UCLASS_FAST_ISA_IMPL & 2)
ensureMsgf(bOldResult == bNewResult, TEXT("New cast code failed"));
#endif
#if UCLASS_FAST_ISA_IMPL & 1
return bOldResult;
#else
return bNewResult;
#endif
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:30,代码来源:UObjectBaseUtility.cpp
示例11: switch
const TCHAR* ELoadingPhase::ToString( const ELoadingPhase::Type Value )
{
switch( Value )
{
case Default:
return TEXT( "Default" );
case PostDefault:
return TEXT( "PostDefault" );
case PreDefault:
return TEXT( "PreDefault" );
case PostConfigInit:
return TEXT( "PostConfigInit" );
case PreLoadingScreen:
return TEXT( "PreLoadingScreen" );
case PostEngineInit:
return TEXT( "PostEngineInit" );
default:
ensureMsgf( false, TEXT( "Unrecognized ELoadingPhase value: %i" ), Value );
return NULL;
}
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:27,代码来源:ModuleDescriptor.cpp
示例12: if
int32 TLinkerImportPlaceholder<UFunction>::ResolvePropertyReferences(UFunction* ReplacementFunc)
{
int32 ReplacementCount = 0;
UFunction* PlaceholderFunc = CastChecked<UFunction>(GetPlaceholderAsUObject());
for (UProperty* Property : ReferencingProperties)
{
if (UDelegateProperty* DelegateProperty = Cast<UDelegateProperty>(Property))
{
if (DelegateProperty->SignatureFunction == PlaceholderFunc)
{
DelegateProperty->SignatureFunction = ReplacementFunc;
++ReplacementCount;
}
}
else if (UMulticastDelegateProperty* MulticastDelegateProperty = Cast<UMulticastDelegateProperty>(Property))
{
if (MulticastDelegateProperty->SignatureFunction == PlaceholderFunc)
{
MulticastDelegateProperty->SignatureFunction = ReplacementFunc;
++ReplacementCount;
}
}
else
{
ensureMsgf(false, TEXT("Unhandled property type: %s"), *Property->GetClass()->GetName());
}
}
ReferencingProperties.Empty();
return ReplacementCount;
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:32,代码来源:LinkerPlaceholderBase.cpp
示例13: while
void FBlueprintNativeCodeGenModule::GenerateStubs()
{
TSet<TAssetPtr<UBlueprint>> AlreadyGenerated;
while (AlreadyGenerated.Num() < StubsRequiredByGeneratedCode.Num())
{
const int32 OldGeneratedNum = AlreadyGenerated.Num();
for (TAssetPtr<UBlueprint>& BPPtr : StubsRequiredByGeneratedCode)
{
bool bAlreadyGenerated = false;
AlreadyGenerated.Add(BPPtr, &bAlreadyGenerated);
if (bAlreadyGenerated)
{
continue;
}
ensureMsgf(AllPotentialStubs.Contains(BPPtr), TEXT("A required blueprint doesn't generate stub: %s"), *BPPtr.ToString());
for (auto& PlatformName : TargetPlatformNames)
{
GenerateSingleStub(BPPtr.LoadSynchronous(), *PlatformName);
}
}
if (!ensure(OldGeneratedNum != AlreadyGenerated.Num()))
{
break;
}
}
UE_LOG(LogBlueprintCodeGen, Log, TEXT("GenerateStubs - all unconverted bp: %d, generated wrapers: %d"), AllPotentialStubs.Num(), StubsRequiredByGeneratedCode.Num());
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:30,代码来源:BlueprintNativeCodeGenModule.cpp
示例14: CreateBinding
void FLevelSequenceObjectReferenceMap::CreateBinding(const FGuid& ObjectId, const FLevelSequenceObjectReference& ObjectReference)
{
if (ensureMsgf(ObjectReference.IsValid(), TEXT("Invalid object reference specifed for binding")))
{
Map.FindOrAdd(ObjectId) = ObjectReference;
}
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:7,代码来源:LevelSequenceObjectReference.cpp
示例15: ensureMsgf
FMovieSceneSequenceInstance::~FMovieSceneSequenceInstance()
{
for (auto& Pair : SpawnedObjects)
{
ensureMsgf(!Pair.Value.Get(), TEXT("Sequence instance is being destroyed but still has spawned objects"));
}
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:7,代码来源:MovieSceneSequenceInstance.cpp
示例16: GetMenuOffsetForPlacement
static FVector2D GetMenuOffsetForPlacement(const FGeometry& AllottedGeometry, EMenuPlacement PlacementMode, FVector2D PopupSizeLocalSpace)
{
switch (PlacementMode)
{
case MenuPlacement_BelowAnchor:
return FVector2D(0.0f, AllottedGeometry.GetLocalSize().Y);
break;
case MenuPlacement_CenteredBelowAnchor:
return FVector2D(-((PopupSizeLocalSpace.X / 2) - (AllottedGeometry.GetLocalSize().X / 2)), AllottedGeometry.GetLocalSize().Y);
break;
case MenuPlacement_ComboBox:
return FVector2D(0.0f, AllottedGeometry.GetLocalSize().Y);
break;
case MenuPlacement_ComboBoxRight:
return FVector2D(AllottedGeometry.GetLocalSize().X - PopupSizeLocalSpace.X, AllottedGeometry.GetLocalSize().Y);
break;
case MenuPlacement_MenuRight:
return FVector2D(AllottedGeometry.GetLocalSize().X, 0.0f);
break;
case MenuPlacement_AboveAnchor:
return FVector2D(0.0f, -PopupSizeLocalSpace.Y);
break;
case MenuPlacement_CenteredAboveAnchor:
return FVector2D(-((PopupSizeLocalSpace.X / 2) - (AllottedGeometry.GetLocalSize().X / 2)), -PopupSizeLocalSpace.Y);
break;
case MenuPlacement_MenuLeft:
return FVector2D(-AllottedGeometry.GetLocalSize().X - PopupSizeLocalSpace.X, 0.0f);
break;
default:
ensureMsgf( false, TEXT("Unhandled placement mode: %d"), PlacementMode );
return FVector2D::ZeroVector;
}
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:33,代码来源:SMenuAnchor.cpp
示例17: ContainsFavoritesItem
/**
* Returns whether a package name is favorited or not
*
* @param Item Package name of the item to check
*
* @return true if the provided item is in the favorite's list; false if it is not
*/
bool FMainMRUFavoritesList::ContainsFavoritesItem( const FString& Item )
{
if (ensureMsgf(FPackageName::IsValidLongPackageName(Item), TEXT("Item is not a valid long package name: '%s'"), *Item))
{
return FavoriteItems.Contains( Item );
}
return false;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:15,代码来源:MRUFavoritesList.cpp
示例18: checkf
void UActorComponent::RegisterComponentWithWorld(UWorld* InWorld)
{
checkf(!HasAnyFlags(RF_Unreachable), TEXT("%s"), *GetFullName());
if(IsPendingKill())
{
UE_LOG(LogActorComponent, Log, TEXT("RegisterComponentWithWorld: (%s) Trying to register component with IsPendingKill() == true. Aborting."), *GetPathName());
return;
}
// If the component was already registered, do nothing
if(IsRegistered())
{
UE_LOG(LogActorComponent, Log, TEXT("RegisterComponentWithWorld: (%s) Already registered. Aborting."), *GetPathName());
return;
}
if(InWorld == NULL)
{
//UE_LOG(LogActorComponent, Log, TEXT("RegisterComponentWithWorld: (%s) NULL InWorld specified. Aborting."), *GetPathName());
return;
}
// If not registered, should not have a scene
checkf(World == NULL, TEXT("%s"), *GetFullName());
// Follow outer chain to see if we can find an Actor
AActor* Owner = GetOwner();
ensureMsgf(Owner == NULL || Owner == GetOuter(), TEXT("Component %s is owned by %s by has an Outer of %s."), *GetName(), *Owner->GetName(), *GetOuter()->GetName());
if ((Owner != NULL) && Owner->GetClass()->HasAnyClassFlags(CLASS_NewerVersionExists))
{
UE_LOG(LogActorComponent, Log, TEXT("RegisterComponentWithWorld: Owner belongs to a DEADCLASS"));
return;
}
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
// Can only register with an Actor if we are created within one
if(Owner != NULL)
{
checkf(!Owner->HasAnyFlags(RF_Unreachable), TEXT("%s"), *GetFullName());
// can happen with undo because the owner will be restored "next"
//checkf(!Owner->IsPendingKill(), TEXT("%s"), *GetFullName());
if(InWorld != GetOwner()->GetWorld())
{
// The only time you should specify a scene that is not GetOwner()->GetWorld() is when you don't have an Actor
UE_LOG(LogActorComponent, Log, TEXT("RegisterComponentWithWorld: (%s) Specifying a world, but an Owner Actor found, and InWorld is not GetOwner()->GetWorld()"), *GetPathName());
}
}
#endif // !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
World = InWorld;
ExecuteRegisterEvents();
RegisterAllComponentTickFunctions(true);
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:58,代码来源:ActorComponent.cpp
示例19: ensureMsgf
void UGame::Init()
{
ensureMsgf( !bIsInitialized, TEXT("Trying to initialize an already initialized game.") );
bIsInitialized = true;
OnInit();
BPF_OnInit();
}
开发者ID:fathurahman,项目名称:game-modules,代码行数:9,代码来源:Game.cpp
示例20: ensureMsgf
class UEdGraph* UEdGraphNode::GetGraph() const
{
UEdGraph* Graph = Cast<UEdGraph>(GetOuter());
if (Graph == NULL)
{
ensureMsgf(false, TEXT("EdGraphNode::GetGraph : '%s' does not have a UEdGraph as an Outer."), *GetPathName());
}
return Graph;
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:9,代码来源:EdGraphNode.cpp
注:本文中的ensureMsgf函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论