HomeModule plugins › AFM_Visibility
Module

AFM_Visibility

Shows and hides actors with sound and material transitions, including a switch component for fading between states.

What it gives you

  • Show and hide with a visible transition
  • Optional collision and tick handling
  • Replicated deletion that plays the transition on every client

Requires

AFM_MeshCopy

Required by

AFE_Showroom AFM_Spawner AF_Examples

4 assets24 API members

Description

Making an actor disappear with SetActorHiddenInGame is abrupt and leaves collision and ticking untouched. BPC_Visibility wraps the operation: it optionally disables collision and ticking, plays a sound, and offers a delete path that fades before destroying.

BPC_Visibility_Switch adds a material-based fade using a mesh copy, so the object dissolves rather than popping.

Setup

  1. Enable AFM_Visibility.
  2. Add BPC_Visibility or BPC_Visibility_Switch to the actor.
  3. Set Include Collision and Include Actor Tick to suit.

Usage

Hiding an object

Call SetVisibility or ToggleVisiblity.

Deleting visibly

Call Delete rather than DestroyActor, so the transition plays first. FL_Delete.DeleteActor does this automatically for any actor, falling back to a plain destroy if the component is absent.

An object caught part-way through its fade
AFM_Visibility_result.pngAn object caught part-way through its fade
An object caught part-way through its fade

Key properties

PropertyWhen to change
Include CollisionTurn off if the object must stay solid while invisible
Include Actor TickTurn off if the object must keep running logic while hidden
Animation DurationFade length on the switch variant
Mesh Selection TagRestrict the fade to tagged meshes

Extending

Derive from BPC_Visibility for custom transitions.

Multiplayer notes

Multiplayer

Multicast_Delete plays the transition on every client before the actor is destroyed, so removals are seen rather than instantaneous.

Example map

Map_Examples_Visibility demonstrates the transitions.

Troubleshooting

The object vanishes instantly. BPC_Visibility was used where BPC_Visibility_Switch was intended — only the switch variant fades.

API reference

Every blueprint asset in this plugin. Expand an asset to see its members.

Components

BPC_Visibility13 members
extends ActorComponent
KindNameSignatureDescription
varIncludeCollisionConfigboolWhether hiding the actor also disables its collision. Turn off if the object should stay solid while invisible.
varIncludeActorTickConfigboolWhether hiding the actor also stops it ticking. Turn off if the object must keep running logic while hidden.
varSound ShowSoundsSoundBaseSound played when the actor becomes visible.
varSound HideSoundsSoundBaseSound played when the actor is hidden.
fngetIsVisibleState(out Visible: bool)Returns whether the owner is currently visible.
eventSetVisibility(SetVisible: bool)Shows or hides the owning actor, applying the configured collision, tick and sound behaviour.
eventApplyDesiredState()Re-applies the current visibility state to the actor, for use after spawning or after components change.
eventDelete()Hides the actor and then destroys it, so the removal is seen rather than instantaneous.
eventOnTransitionFinished_Event()Internal handler that completes the pending visibility change once its transition has played.
eventMulticast_Delete()Replicated deletion, so every client plays the hide transition before the actor disappears.
eventServer_ServerDelete()Asks the server to delete this actor for all players.
eventStartDelete()Begins the delete sequence, playing the hide transition before destruction.
eventToggle Visiblity()Flips the actor between visible and hidden.
BPC_Visibility_Switch9 members
extends BPC_Visibility
KindNameSignatureDescription
varAnimationDurationSettingsfloatDuration in seconds of the fade between visible and hidden.
varMaterialSettingsMaterialInterfaceMaterial used for the transition copy of the meshes while fading.
varTagSelectionSelectionE_Visiblity_MeshSelectionWhether the transition applies to all meshes on the actor or only those carrying the selection tag.
varMeshSelectionTagSelectionnameComponent tag identifying which meshes take part in the transition, when tag selection is enabled.
fngetIsVisible(out Visible: bool)Returns whether the owner is currently visible, accounting for a transition in progress.
eventOnTransitionFinished_Helper()Internal handler fired when the mesh-copy fade completes.
eventOnFadeUpdate_Event(Progress: float)Internal handler that drives the fade material as the transition progresses.
eventOnTriggerMeshVisibility_Event()Internal handler that flips the real meshes at the midpoint of the fade.
eventSetVisibility(SetVisible: bool)Shows or hides the actor with a material fade rather than an instant switch.

Helper

BP_Helper_MeshCopy_Visibility1 members
extends BP_Helper_MeshCopy
KindNameSignatureDescription
fngetVisibilityTimeline(out ShowMaterial: TimelineComponent)Returns the timeline used for the visibility fade on this mesh copy.

Libraries

FL_Delete1 members
extends BlueprintFunctionLibrary
KindNameSignatureDescription
fnDeleteActorDelete(Target: Actor, __WorldContext: Object)Deletes an actor through its visibility component if it has one, so the hide transition plays, and destroys it outright otherwise.