Knowledge base
Knowledge base
Knowledge base
Free, anonymous browsing of Unreal Engine Blueprint examples, node references, and best practices. The same content the WoalzCraft plugin uses to generate Blueprints.
28 results for runtime
Why: Your code reads from a '{ref}' reference, but nothing was assigned to it. UE5 doesn't error at compile time, but warns that the runtime access will crash with null-pointer. Fix: Wherever this BP spawns, set the reference via Spawn Actor From Class → Set Reference. If it should be set from outside, expose the variable (eye-icon = Instance Editable) so it's set in the level editor. Add an Is Valid? Branch before each read to gracefully handle null.
UPrimitiveComponent method. Store result in variable and reuse. Create once in BeginPlay.
Create Dynamic Material InstanceUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoMust call this before SetScalarParameterValue/SetVectorParameterValue. Store the result in a variable for reuse.
CreateDynamicMaterialInstanceUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoA visual scripting asset (.uasset) that defines runtime behavior without C++. Compiles to bytecode the engine executes.
Pattern: EventBeginPlay → GetMesh → CreateDynamicMaterialInstance(ElementIndex=0) → SetVariable(DynMat=ReturnValue). Then on Tick or timer: SetScalarParameterValue(ParameterName='Opacity', Value=SinWave). Or for color: SetVectorParameterValue(ParameterName='Color', Value=MakeLinearColor). Key: CreateDynamicMaterialInstance is called on the COMPONENT (GetMesh), not the actor. Must store the result before using Set*ParameterValue. ParameterName MUST match the name in the Material asset exactly.
A live, runtime object of a class. Properties on an instance can differ from defaults set in the class.
Pattern: BeginPlay → CreateDynamicMaterialInstance(MeshComponent, 0) → store as variable DynMat. On trigger → SetVectorParameterValue(DynMat, 'BaseColor', LinearColor). Create MID once in BeginPlay, reuse variable. Parameter name must match Material parameter exactly (case-sensitive).
Set Texture Parameter ValueUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoCall on a TextBlock widget variable from your Widget BP. Use 'Format Text' or 'Conv_StringToText' to build the Text value.
SetTextUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoDealing damage: Event → ApplyDamage(TargetActor, BaseDamage, InstigatorController, DamageCauser, DamageTypeClass). Receiving: EventAnyDamage → Damage output → Subtract_FloatFloat(CurrentHealth, Damage) → FClamp(Result, 0, MaxHealth) → SET CurrentHealth → Branch(CurrentHealth <= 0) → True: DestroyActor. Initialize CurrentHealth=MaxHealth in BeginPlay.