visibility toggle for multiple objects
Hello! I have lots of objects in my scene which need to toggle off when a particular object is looked at. Currently I am using ToggleVisibility in the level Blueprint, which works well. However, as there are a lot of objects, it seems it would be much more efficient to set the object I want to be 'seen' rather than individually set potentially dozens of objects to toggle 'not seen'. Anyone have any ideas on this? Thanks!
asked Aug 17 '16 at 12:11 PM in Using UE4
Because you're doing this in the level blueprint editor... On begin play, assign your objects (assuming they are the same type of actor and using the same type of reference) to an array.
If these were all blueprint actors, you could use a GetAllActorsOfClass when you need to access them, which would store them in an array.
Or if they were several actors within a single blueprint, you could just store them in an array variable from the start or do so in the construction script.
For visibility purposes, I think you can just toggle the visibility of the array. If that doesn't work, you may have to (like most actions being taken on arrays) run a ForEach loop for it, but I don't think it's necessary for a simple toggle vis.
Follow this question
Once you sign in you will be able to subscribe for any updates here