Hello,
I would like to change traversableTags through script rather than through inspector, and I have a rather large number of tags and seekers. How do I go about setting specific ones to false?
Hello,
I would like to change traversableTags through script rather than through inspector, and I have a rather large number of tags and seekers. How do I go about setting specific ones to false?
Hi
Like this:
var seeker = GetComponent<Seeker>();
// Allow traversing tags 0 and 3
seeker.traversableTags = (1 << 0) | (1 << 3);
// Allow traversing every tag *except* tags 2 and 3
seeker.traversableTags = ~((1 << 0) | (1 << 3));
See also https://www.arongranberg.com/astar/documentation/dev_4_1_8_94c97625/bitmasks.html