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.
20 results for instantiate
A blueprint or C++ type that can be instantiated. Each spawned Actor or component is an instance of a class.
For non-Actor objects (UObjects). Actors must use SpawnActorFromClass instead. Outer is usually 'self' or GetTransientPackage().
NewObjectUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoK2Node_CreateWidget. Class is the Widget Blueprint class reference.
Create WidgetUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoBlueprint-exposed version of NewObject. Cast result to your specific class.
ConstructObjectFromClassUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoSETUP: In your BP, create an Event Dispatcher (e.g. 'OnPlayerDied') in the My Blueprint panel. BIND (in another BP): Get reference to actor → Bind Event to OnPlayerDied → connect a Custom Event as the target. CALL (in owning BP): Call OnPlayerDied (appears as a pink node) → this broadcasts to all bound listeners. Key: Event Dispatchers are called with 'Call <DispatcherName>' (not 'Broadcast'). Binding is done via 'Bind Event to <DispatcherName>' which has an 'Event' exec-like pin.
Always pass a valid PlayerController as OwningPlayer. Cast the ReturnValue to your specific widget class.
CreateWidgetUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoUPrimitiveComponent 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 agoCreates a new Actor instance at runtime. Pass a Class Reference + Transform + Owner. Use BeginSpawnActor for deferred init.
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.