I am trying to delete all decals in the level via a For Each Loop. I’m using the “Get All Actors Of Class” to attempt to find all decals but it doesn’t work - the debug log prints that it looped 0 times meaning it didn’t find anything. Here’s my level blueprint:
Note that no decals are initially created when the map loads, but the decals are being created via “Spawn Decal at Location” when an actor is destroyed, like so:
This method works great when deleting objects of a different class than “Decal Actor”, but not with decals that have been spawned at a location. Could someone please help me get this working?
I haven’t worked with decals much but looking at the return type, it seems that a decal is not an actor but a component. Try it like this and see if that helps:
Hey there, Spawn Decals doesn’t create a DecalActor, but instead creates a Decal Component. Since you are using Spawn Decal At Location then that means that he adds the decal component to the World Settings actor that is inside the GetWorld(). The problem is that i don’t think you can access that in Blueprints, you would need to create a get function in c++ that would do that for you, something like:
Oh, wow! Well thank you for the help - I appreciate it but I am a beginner so unfortunately I don’t have any C++ experience yet. Maybe I can try to stumble my way through the C++…
I can’t accomplish what I’m trying to do purely with blueprints though?
If not, is there a way to spawn a decal differently so it is exposed to BP?