Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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!

alt text

Product Version: UE 4.12
toggle.jpg (99.8 kB)
more ▼

asked Aug 17 '16 at 12:11 PM in Using UE4

avatar image

14 2 6 7

avatar image Johnnyx Aug 17 '16 at 12:32 PM

or.... maybe there is a way for a given camera to only show chosen objects?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Aug 18 '16 at 04:39 AM

avatar image

232 10 9 23

avatar image Johnnyx Aug 18 '16 at 08:41 AM

Wonderful! thanks - will be looking at this!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question