Y
Y
Yura Mailler2021-08-11 10:21:46
Unity
Yura Mailler, 2021-08-11 10:21:46

Is it possible to make an action for each trigger?

Hello! I have an object (player) and I have a question, is it possible to attach several triggers to the object so that in the script, when interacting with a trigger, for example #1 , its code line is executed for it, for example a = true ,
and when interacting with trigger #4 , a = false ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Zaletsky, 2021-08-11
@Yura111

Hang "tags" on objects and then write code that if an action has occurred with such a tag, then the action is like that, perhaps there is another way to solve it, but only such an idea came to mind.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question