Unreal Engine & Blueprints
Random Static Mesh
Written guide

Playing loads YouTube content. YouTube processes data after activation.
Watch on YouTubeIf the player is blocked or unavailable, use Watch on YouTube.
This short Unreal Blueprint lesson chooses between two static-mesh assets when an Actor begins play. The example uses imported assets named Ball and Door. It demonstrates changing the mesh assigned to a component, not spawning different enemy classes or constructing a complete randomized encounter system.
The exact engine release is unidentified. The instructor restarts the Actor Blueprint after a naming-related problem, then builds a small graph with Begin Play, Random Integer in Range, Switch on Int, and two Set Static Mesh operations.
Prepare one component and two possible meshes
At 00:02–02:03, the instructor imports the example geometry as static meshes and creates an Actor Blueprint. A Static Mesh component provides the target whose assigned asset will change.
The component and the selected asset have different roles. The component is the instance within the Blueprint that can be positioned and displayed; the Ball or Door asset supplies its geometry. Keeping one component allows the same Actor structure to use either appearance.
Both choices need to be compatible with this static-mesh workflow. The opening suggestion about different enemies describes a possible future use of random choice, not evidence that skeletal characters or separate Actor classes can be substituted through this same mesh-setting operation.
Route one random integer to a matching mesh assignment
During 02:03–03:04, Begin Play executes Switch on Int. A Random Integer in Range supplies the selection value. Two switch cases lead to separate Set Static Mesh nodes targeting the component, with one node assigning Ball and the other assigning Door.
The switch separates the random decision from the resulting operation. Inspect both parts: the integer must be able to select either case, and each execution output must reach the intended mesh assignment.
This graph runs its choice at Begin Play. It does not continuously change meshes while the level is running, and it does not establish seeded repeatability across play sessions.
Correct the range before judging the random result
At 03:04–05:00, repeated play tests initially produce only Ball. The instructor checks the graph and finds that the random range is still zero to zero. That setting has only one possible output, so the second switch case cannot be selected.
Expand the range to cover both configured case indices. The number of Set Static Mesh nodes does not automatically change the random node’s bounds; those two pieces of the graph must agree.
After the correction, both assets appear in repeated tests, although Ball still appears several times in succession. Repetition alone does not prove the graph is broken. First inspect whether both cases are reachable, then verify that each assigns the expected asset.
Confirm the limited result
During 05:00–05:24, the instructor gets another Door result and concludes the demonstration. The useful checkpoint is that the placed Actor can start with either mesh through the same component.
The recording does not establish a balanced count over a measured sample, prevent consecutive repeats, or reconcile differences in the meshes’ pivots, dimensions, and collision. Inspect those properties if the alternatives must behave identically in a game. The demonstrated achievement is the random selection and assignment itself.