The result of the Set Niagara Static Mesh Component (OverrideSystemUserVariableStaticMeshComponent) function provided by the UNiagaraFunctionLibrary is different from the operation result on the details panel of the editor. Specifically, when using the above function, SetParameterOverride is not executed, so Variable is not added to InstanceParameterOverrides of UNiagaraComponent.
The following code will fix this issue.
void UNiagaraFunctionLibrary::OverrideSystemUserVariableStaticMeshComponent(UNiagaraComponent* NiagaraSystem, const FString& OverrideName, UStaticMeshComponent* StaticMeshComponent) { ... // add start FNiagaraVariant NiagaraVariant(StaticMeshInterface); NiagaraSystem->SetParameterOverride(Variable, NiagaraVariant); FPropertyChangedEvent PropertyChangeEvent(UNiagaraComponent::StaticClass()->FindPropertyByName("InstanceParameterOverrides")); NiagaraSystem->PostEditChangeProperty(PropertyChangeEvent); // add end StaticMeshInterface->SetSourceComponentFromBlueprints(StaticMeshComponent); }
expect : two clouds have the same movement
result : Clouds added in EUW do not animate
I am not able to find world outliner how to enable it?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Delay nodes occasionally don't fire the "Completed" output in a nativized build
How can i modify the param name in EQS node
How to achieve HLSL Multiple Render Target in Material blueprints?
How does TextureRenderTarget2D get TArray<uint8> type data?
How does UMG set overlapping layouts?
Why does the system plugin 'UnrealBuildTool' error could not be found when the project is compiled?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-174064 in the post.
0 |
Component | UE - Niagara |
---|---|
Target Fix | 5.4 |
Created | Jan 13, 2023 |
---|---|
Resolved | Oct 17, 2023 |
Updated | Nov 2, 2023 |