G
G
Gregory2562022-02-08 11:43:33
Unity
Gregory256, 2022-02-08 11:43:33

Is it possible to build game logic on tags?

Good day, please tell me how dangerous the structure of game logic by tags is.
That is, all player interactions are built on tags.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Ente, 2022-02-08
@Gregory256

1) Searching for objects by tags takes a long time, constant caching is required.
2) There can be a lot of tags, choosing the right tag from 2000 is such a pleasure.
3) You can't make multiple tags (similar to classes in HTML/JS). Let's say we have a strategy where there are two types of units - vehicles and infantry, we cannot make a common Unit tag and add the Infantry and Vehicle tags as a plus, respectively, for a better search.
If you want to get rid of Unity's serialized fields (since they often break) and search by them, it's better to write your own tag system (which will support multiplicity) and make it by analogy with classes in HTML / JS (naturally, with caching)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question