Knowledge base
Knowledge base
MISTAKE 1: Calling GetAllActorsOfClass every Tick. FIX: Cache results in BeginPlay or use delegates/tags instead.
MISTAKE 2: Not checking IsValid before using object references. FIX: Always IsValid → Branch → Is Valid before dereferencing.
MISTAKE 3: Using hard references to large assets in variables. FIX: Use Soft Object References + AsyncLoadAsset.
MISTAKE 4: Tick enabled on many actors doing heavy work. FIX: SetActorTickInterval(0.1) for non-critical logic, or use Timers.
MISTAKE 5: Casting to specific class without checking IsValid first. FIX: CastTo has 'Cast Failed' output — always handle it.
MISTAKE 6: Modifying array elements by getting then setting a copy. FIX: Use 'Array Set' with index to modify in-place.
MISTAKE 7: Creating widget every time it's shown. FIX: Create once → cache reference → show/hide with SetVisibility or Add/RemoveFromParent.