本文整理汇总了C++中UProperty::GetFName方法的典型用法代码示例。如果您正苦于以下问题:C++ UProperty::GetFName方法的具体用法?C++ UProperty::GetFName怎么用?C++ UProperty::GetFName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UProperty
的用法示例。
在下文中一共展示了UProperty::GetFName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PostEditChangeProperty
void USoundWave::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
static FName CompressionQualityFName = FName( TEXT( "CompressionQuality" ) );
static FName StreamingFName = GET_MEMBER_NAME_CHECKED(USoundWave, bStreaming);
// Prevent constant re-compression of SoundWave while properties are being changed interactively
if (PropertyChangedEvent.ChangeType != EPropertyChangeType::Interactive)
{
UProperty* PropertyThatChanged = PropertyChangedEvent.Property;
// Regenerate on save any compressed sound formats
if ( PropertyThatChanged && PropertyThatChanged->GetFName() == CompressionQualityFName )
{
InvalidateCompressedData();
FreeResources();
UpdatePlatformData();
MarkPackageDirty();
}
else if (PropertyThatChanged && PropertyThatChanged->GetFName() == StreamingFName)
{
FreeResources();
UpdatePlatformData();
MarkPackageDirty();
}
}
}
示例2: PostEditChangeChainProperty
void UCanvasPanelSlot::PostEditChangeChainProperty(struct FPropertyChangedChainEvent& PropertyChangedEvent)
{
SynchronizeProperties();
static FName AnchorsProperty(TEXT("Anchors"));
FEditPropertyChain::TDoubleLinkedListNode* AnchorNode = PropertyChangedEvent.PropertyChain.GetHead()->GetNextNode();
if ( !AnchorNode )
{
return;
}
FEditPropertyChain::TDoubleLinkedListNode* LayoutDataNode = AnchorNode->GetNextNode();
if ( !LayoutDataNode )
{
return;
}
UProperty* AnchorProperty = LayoutDataNode->GetValue();
if ( AnchorProperty && AnchorProperty->GetFName() == AnchorsProperty )
{
RebaseLayout();
}
Super::PostEditChangeProperty(PropertyChangedEvent);
}
示例3: FindChildPropertyNode
/**
* Finds a child property node from the provided parent node (does not recurse into grandchildren)
*
* @param InParentNode The parent node to locate the child from
* @param PropertyName The property name to find
* @param Index The index of the property if its in an array
*/
static TSharedPtr<FPropertyNode> FindChildPropertyNode( FPropertyNode& InParentNode, const FString& PropertyName, int32 Index )
{
TSharedPtr<FPropertyNode> FoundNode(NULL);
// search each child for a property with the provided name
for( int32 ChildIndex = 0; ChildIndex < InParentNode.GetNumChildNodes(); ++ChildIndex )
{
TSharedPtr<FPropertyNode>& ChildNode = InParentNode.GetChildNode(ChildIndex);
UProperty* Property = ChildNode->GetProperty();
if( Property && Property->GetFName() == *PropertyName )
{
FoundNode = ChildNode;
break;
}
}
// Find the array element.
if( FoundNode.IsValid() && Index != INDEX_NONE )
{
// The found node is the top array so get its child which is the actual node
FoundNode = FoundNode->GetChildNode( Index );
}
return FoundNode;
}
示例4: GetPropertyByNameRecurse
static UProperty *GetPropertyByNameRecurse( UStruct *InStruct, const FString &TokenString, void ** hContainerPtr, int32 &OutArrayIndex )
{
FString FirstToken;
FString RemainingTokens;
int32 SplitIndex;
if ( TokenString.FindChar( '.', SplitIndex ) )
{
FirstToken = TokenString.LeftChop( TokenString.Len()-SplitIndex );
RemainingTokens = TokenString.RightChop(SplitIndex+1);
}
else
{
FirstToken = TokenString;
RemainingTokens = FString(TEXT(""));
}
//get the array index if there is any
int32 ArrayIndex = 0;
if ( FirstToken.FindChar( '[', SplitIndex ) )
{
FString ArrayIndexString = FirstToken.RightChop( SplitIndex+1 );
ArrayIndexString = ArrayIndexString.LeftChop( 1 );
FDefaultValueHelper::ParseInt( ArrayIndexString, ArrayIndex );
FirstToken = FirstToken.LeftChop( FirstToken.Len()-SplitIndex );
}
for (TFieldIterator<UProperty> PropertyIt(InStruct, EFieldIteratorFlags::IncludeSuper); PropertyIt; ++PropertyIt)
{
UProperty* Property = *PropertyIt;
FName PropertyName = Property->GetFName();
if ( FirstToken == PropertyName.ToString() )
{
if ( RemainingTokens.Len() == 0 )
{
check( *hContainerPtr != NULL );
OutArrayIndex = ArrayIndex;
return Property;
}
else
{
UStructProperty *StructProp = Cast<UStructProperty>(Property);
if ( StructProp )
{
check( *hContainerPtr != NULL );
*hContainerPtr = Property->ContainerPtrToValuePtr<void>( *hContainerPtr, ArrayIndex );
return GetPropertyByNameRecurse( StructProp->Struct, RemainingTokens, hContainerPtr, OutArrayIndex );
}
}
}
}
return NULL;
}
示例5: FindScriptPropertyHelper
UProperty* FindScriptPropertyHelper(UClass* Class, FName PropertyName)
{
for (TFieldIterator<UProperty> PropertyIt(Class, EFieldIteratorFlags::ExcludeSuper); PropertyIt; ++PropertyIt)
{
UProperty* Property = *PropertyIt;
if (Property->GetFName() == PropertyName)
{
return Property;
}
}
return NULL;
}
示例6: SaveClassFieldMapping
void FBlueprintCompileReinstancer::SaveClassFieldMapping(UClass* InClassToReinstance)
{
check(InClassToReinstance);
for (UProperty* Prop = InClassToReinstance->PropertyLink; Prop && (Prop->GetOuter() == InClassToReinstance); Prop = Prop->PropertyLinkNext)
{
PropertyMap.Add(Prop->GetFName(), Prop);
}
for (auto Function : TFieldRange<UFunction>(InClassToReinstance, EFieldIteratorFlags::ExcludeSuper))
{
FunctionMap.Add(Function->GetFName(),Function);
}
}
示例7: PostEditChangeProperty
void UEditorLiveStreamingSettings::PostEditChangeProperty( struct FPropertyChangedEvent& PropertyChangedEvent )
{
UProperty* PropertyThatChanged = PropertyChangedEvent.Property;
const FName Name = PropertyThatChanged ? PropertyThatChanged->GetFName() : NAME_None;
// if( Name == ??? )
// {
// ...
// }
// Save config to file, but only if we are not the build machine since game agnostic settings may put the builder in an unclean state
if( !GIsBuildMachine )
{
this->SaveConfig();
}
}
示例8: PostEditChangeProperty
void ADEPRECATED_VolumeAdaptiveBuilder::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
UProperty* PropertyThatChanged = PropertyChangedEvent.Property;
FName PropertyName = PropertyThatChanged != NULL ? PropertyThatChanged->GetFName() : NAME_None;
if (PropertyName == GET_MEMBER_NAME_CHECKED(ADEPRECATED_VolumeAdaptiveBuilder, IsVisibleNavigableVolumes) ||
PropertyName == GET_MEMBER_NAME_CHECKED(ADEPRECATED_VolumeAdaptiveBuilder, IsVisibleBlockedVolumes) ||
PropertyName == GET_MEMBER_NAME_CHECKED(ADEPRECATED_VolumeAdaptiveBuilder, IsVisibleInGame)
)
{
for (UDoNNavigationVolumeComponent* volume : NAVVolumeComponents)
{
if (!volume)
continue;
if (volume->CanNavigate)
volume->SetVisibility(IsVisibleNavigableVolumes);
else
volume->SetVisibility(IsVisibleBlockedVolumes);
volume->SetHiddenInGame(!IsVisibleInGame);
}
}
if (GenerateNavigationVolumes)
{
ADEPRECATED_VolumeAdaptiveBuilder::ConstructBuilder();
GenerateNavigationVolumes = false;
}
if (RegenerateNAVNetwork || PropertyName == GET_MEMBER_NAME_CHECKED(ADEPRECATED_VolumeAdaptiveBuilder, DisplayNAVNeighborGraph))
{
FlushPersistentDebugLines(GetWorld());
BuildNAVNetwork();
RegenerateNAVNetwork = false;
}
if (CleanUpAllData)
{
CleanUp();
CleanUpAllData = false;
}
}
示例9: Supports
bool FConfigPropertyCustomColumn::Supports(const TSharedRef< IPropertyTableColumn >& Column, const TSharedRef< IPropertyTableUtilities >& Utilities) const
{
bool IsSupported = false;
if (Column->GetDataSource()->IsValid())
{
TSharedPtr< FPropertyPath > PropertyPath = Column->GetDataSource()->AsPropertyPath();
if (PropertyPath.IsValid() && PropertyPath->GetNumProperties() > 0)
{
const FPropertyInfo& PropertyInfo = PropertyPath->GetRootProperty();
UProperty* Property = PropertyInfo.Property.Get();
IsSupported = Property->GetFName() == TEXT("ExternalProperty");
}
}
return IsSupported;
}
示例10: PostEditChangeProperty
void ULevelStreaming::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
UProperty* OutermostProperty = PropertyChangedEvent.Property;
if ( OutermostProperty != NULL )
{
const FName PropertyName = OutermostProperty->GetFName();
if (PropertyName == GET_MEMBER_NAME_CHECKED(ULevelStreaming, LevelTransform))
{
GetWorld()->UpdateLevelStreaming();
}
if (PropertyName == GET_MEMBER_NAME_CHECKED(ULevelStreaming, EditorStreamingVolumes))
{
RemoveStreamingVolumeDuplicates();
// Update levels references in each streaming volume
for (TActorIterator<ALevelStreamingVolume> It(GetWorld()); It; ++It)
{
(*It)->UpdateStreamingLevelsRefs();
}
}
else if (PropertyName == GET_MEMBER_NAME_CHECKED(ULevelStreaming, LevelColor))
{
// Make sure the level's Level Color change is applied immediately by reregistering the
// components of the actor's in the level
if( LoadedLevel != NULL )
{
UPackage* Package = LoadedLevel->GetOutermost();
for( TObjectIterator<UActorComponent> It; It; ++It )
{
if( It->IsIn( Package ) )
{
UActorComponent* ActorComponent = Cast<UActorComponent>( *It );
if( ActorComponent )
{
ActorComponent->RecreateRenderState_Concurrent();
}
}
}
}
}
}
Super::PostEditChangeProperty(PropertyChangedEvent);
}
示例11: GetMatchingProperties
void FAIDataProviderValue::GetMatchingProperties(TArray<FName>& MatchingProperties) const
{
if (DataBinding)
{
for (UProperty* Prop = DataBinding->GetClass()->PropertyLink; Prop; Prop = Prop->PropertyLinkNext)
{
if (Prop->HasAnyPropertyFlags(CPF_Edit))
{
continue;
}
if (IsMatchingType(Prop))
{
MatchingProperties.Add(Prop->GetFName());
}
}
}
}
示例12: GetPropertyByNameRecurse
static UProperty *GetPropertyByNameRecurse( UStruct *InStruct, const FString &TokenString )
{
FString FirstToken;
FString RemainingTokens;
int32 SplitIndex;
if ( TokenString.FindChar( '.', SplitIndex ) )
{
FirstToken = TokenString.LeftChop( TokenString.Len()-SplitIndex );
RemainingTokens = TokenString.RightChop(SplitIndex+1);
}
else
{
FirstToken = TokenString;
RemainingTokens = FString(TEXT(""));
}
if ( FirstToken.FindChar( '[', SplitIndex ) )
{
FirstToken = FirstToken.LeftChop( FirstToken.Len()-SplitIndex );
}
for (TFieldIterator<UProperty> PropertyIt(InStruct, EFieldIteratorFlags::IncludeSuper); PropertyIt; ++PropertyIt)
{
UProperty* Property = *PropertyIt;
FName PropertyName = Property->GetFName();
if ( FirstToken == PropertyName.ToString() )
{
if ( RemainingTokens.Len() == 0 )
{
return Property;
}
else
{
UStructProperty *StructProp = Cast<UStructProperty>(Property);
if ( StructProp )
{
return GetPropertyByNameRecurse( StructProp->Struct, RemainingTokens );
}
}
}
}
return NULL;
}
示例13: FindTableProperty
/** Returns the column property where PropertyName matches the name of the column property. Returns NULL if no match is found or the match is not a supported table property */
UProperty* UDataTable::FindTableProperty(const FName& PropertyName) const
{
UProperty* Property = NULL;
for (TFieldIterator<UProperty> It(RowStruct); It; ++It)
{
Property = *It;
check(Property != NULL);
if (PropertyName == Property->GetFName())
{
break;
}
}
if (!DataTableUtils::IsSupportedTableProperty(Property))
{
Property = NULL;
}
return Property;
}
示例14: CopyFromStruct
void UGAAttributesBase::CopyFromStruct(UStruct* StructType, void* StructObject)
{
for (TFieldIterator<UProperty> StrIt(StructType); StrIt; ++StrIt)
{
UProperty* Property = *StrIt;
if (UStructProperty* StructProp = Cast<UStructProperty>(Property))
{
FAFAttributeBase* StructAttr = StructProp->ContainerPtrToValuePtr<FAFAttributeBase>(StructObject);
UProperty* ThisProp = FindProperty(FGAAttribute(Property->GetFName()));
if (ThisProp)
{
FAFAttributeBase* ThisAttribute = ThisProp->ContainerPtrToValuePtr<FAFAttributeBase>(this);
if (StructAttr && ThisAttribute)
{
ThisAttribute->CopyFromOther(StructAttr);
}
}
}
}
}
示例15: RegisterDelegateNet
void RegisterDelegateNet(FKismetFunctionContext& Context, UK2Node_DelegateSet* DelegateNode)
{
check(DelegateNode);
UEdGraphPin* DelegatePin = DelegateNode->GetDelegateOwner();
check(DelegatePin);
// Find the property on the specified scope
UProperty* BoundProperty = NULL;
for (TFieldIterator<UProperty> It(DelegateNode->DelegatePropertyClass, EFieldIteratorFlags::IncludeSuper); It; ++It)
{
UProperty* Prop = *It;
if( Prop->GetFName() == DelegateNode->DelegatePropertyName )
{
check(Prop->HasAllPropertyFlags(CPF_BlueprintAssignable));
BoundProperty = Prop;
break;
}
}
// Create a term for this property
if( BoundProperty != NULL )
{
FBPTerminal* Term = new(Context.VariableReferences) FBPTerminal();
Term->CopyFromPin(DelegatePin, DelegatePin->PinName);
Term->AssociatedVarProperty = BoundProperty;
Context.NetMap.Add(DelegatePin, Term);
// Find the context for this term (the object owning the delegate property)
FBPTerminal** pContextTerm = Context.NetMap.Find(FEdGraphUtilities::GetNetFromPin(DelegatePin));
if( pContextTerm )
{
Term->Context = *pContextTerm;
}
else
{
CompilerContext.MessageLog.Error(*FString(*LOCTEXT("FindDynamicallyBoundDelegate_Error", "Couldn't find target for dynamically bound delegate node @@").ToString()), DelegateNode);
}
}
}