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.
23 results for list
ADD: Array Add (Target Array=MyArray, New Item=newElement). READ: Array Get (Target Array=MyArray, Index=i) → use 'Item' output. FIND: Array Contains (returns bool) or Array Find (returns index, -1 if not found). REMOVE by index: Array Remove (Target Array=MyArray, Index=i). REMOVE by value: Array Remove Item (Target Array=MyArray, Item=value). ITERATE: ForEachLoop(Array=MyArray) → 'Array Element' output is the current item. LENGTH: Array Length (returns int). Key: Array nodes operate on the array BY REFERENCE — always connect the array variable directly.
An ordered list of values of one type. Add/Remove/Find/Get by index. Pair with ForEachLoop for iteration.
1. TICK MANAGEMENT: - Disable tick on static actors (SetActorTickEnabled=false). - Use SetActorTickInterval(0.1-0.5) for AI, non-critical systems. - Prefer event-driven over tick polling where possible. 2. AVOID EVERY-TICK EXPENSIVE CALLS: - GetAllActorsOfClass: cache in BeginPlay, refresh only when needed. - CastTo: cache result in variable after first cast. - GetComponentByClass: call once and store reference. 3. VISIBILITY: - SetActorHiddenInGame + SetActorTickEnabled=false for off-screen actors. - Use LOD (Level of Detail) on meshes. 4. SPAWNING: - Use object pooling for frequently spawned/destroyed actors (bullets, effects). 5. EVENTS OVER POLLING: - Use overlap events instead of periodic distance checks. - Use delegates/dispatchers instead of checking conditions each frame.
Expensive — avoid calling every Tick. Cache results or use delegates instead.
GetAllActorsOfClassUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agostring
UGameplayStatics::GetAllActorsOfClass. Expensive — cache results, don't call every tick.
Get All Actors Of ClassUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoNOTUE 5.4, 5.7updated 2mo agoPattern: Pickup actor with SphereCollision(overlap), StaticMesh visual. OnComponentBeginOverlap → CastTo PlayerCharacter → Success: call AddScore/AddItem interface on player → PlaySoundAtLocation → SpawnEmitterAtLocation → DestroyActor(self). Set collision to OverlapOnlyPawn for performance.
Pattern: Struct S_InventoryItem(ItemName:String, Quantity:int, Icon:Texture2D, bStackable:bool). Variable Inventory(Array<S_InventoryItem>). AddItem: ForEachLoop(Inventory) → Branch(Element.ItemName == NewItem.Name AND bStackable) → True: SET Element.Quantity += Amount. If not found: Array_Add(NewItem). RemoveItem: Find index → Branch(Quantity > 1) → True: decrement. False: Array_Remove.
Create struct FInventoryItem: {ItemName (Name), ItemCount (int), ItemData (object ref)}. Variable: Inventory (Array<FInventoryItem>). AddItem: ForEachLoop(Inventory) → CastTo/Break FInventoryItem → Branch(ItemName==NewItem.Name) → True: Get → Modify Count → Array Set (replace at index) → return. If not found: Make FInventoryItem → Array Add. RemoveItem: Find by name → Branch(Count>1) → True: decrement → Set at index. Else: Array Remove at index. Key: Arrays of structs require 'Array Set' with index to modify in place — getting and modifying a copy does NOT update the array.