Answer the question
In order to leave comments, you need to log in
How to activate another item when an object reappears?
I have 4 panels with a task, an object is attached to each panel, at the beginning of the game it appears a panel with a task and an item, and if you pick it up, the panel disappears and all objects attached to it also disappear, and another panel appears with other items. So if the panel has already appeared, I cannot activate the items attached to it again. How can I check if this panel is active, and if it is active, then every time it will appear along with the items, and not just 1 time.
Answer the question
In order to leave comments, you need to log in
and now point by point (more or less)
1 - screenshots of the hierarchy and the scene. what kind of panels to make it clear.
2- code and a clear explanation for "the panel disappears and all objects attached to it also disappear." the object is turned off. the object is removed. or whatever is going on with it.
3 - video or, again, screenshots of how it happens. and some more intelligible explanation of how you need / want it to happen.
4 - how do you switch panels?
5 - do you have an array/list of links to these Panels?
6 - how are the objects on the panels activated?
Just re-read your question, imagining that you have not seen any code, no hierarchy, no video how it works. telepathy, of course, some swing, but still ..
I can assume that perhaps you used somewhere the search for objects through Find or a similar method. And you turn off the objects through SetActive ().
then the point is that the search does not see the turned off objects and it is necessary to store links to them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question