Issue with overlapping GraphUpdateScenes (i.e. tagged restricted area within another)

I thought this was something you could do but maybe not… I have a body of water that it want to add costs and restrictions for going though the shallow and deep areas. Some of the AI will be allowed to walk in the deep region where others may or may not be allowed in the shallow area water.

There is a Graph Update Scene that I have bordering the edge of the water and another inner to that boarders the deep regions. One layer seems to always win over the other (typically the outer zone) while the other layer is ignored.

I tried this with partly overlapping zones as well and one layer would win for the overlapping space.

Ideally I’d like for these zones to work with both tags areas overlapping. Also, I might be able to do what I need as long as I can control the priority of which later gets applied. How is this supposed to work and what can I do to make my situation functional?

This is not something enabled by default. Mainly because you rarely need two tags which are overlapping and it also uses more memory. However, it is possible by enabling the ConfigureTagsAsMultiple preprocessor directive. If you have the pro version you can go to the Optimizations tab and enable it from there. If you have the free version, but are using Unity 4. you can add ConfigureTagsAsMultiple to the list of defines in the unity Player Settings. If none of these, you will have to search in all files and enable it manually by uncommenting some code (will be quite obvious which code).

I am not sure if everything will compile with that define, hopefully it will, but I am not sure.

One problem with using multiple tags is that it is not easily defined which areas a unit can walk on. Currently a unit will be able to walk on a node if it has at least one tag set which the unit can traverse. However this might not be the behavior you want. If that becomes a problem, ask here and I can guide you with directions on how to change that behavior.

The priority order of GraphUpdateScene objects is not specified at the moment. It is a good feature to add though. I will add it to my ToDo list (might get included in 3.2 depending on if I will have the time).

I will try out your suggestion, I’ve not upgrades to U4 yet and I’m currently trying out the free version of A*. It is fantastic so far I want to get a hang of it and make sure it is right for my project before I go to Pro. So far it is doing what I needed that the Unity NavMesh didn’t offer thumbs up.

I think for my needs if I could just control the priority of the tag that get baked in for any zones I specify, I can manual sort them in an order that would work for my needs. In the Pro version specs it mentions a feature of using a texture to define this data. If I could paint and control my layers it would be perfect. Would that also give me the control I’m looking for? Could you give a little more insight on that feature, such as do you edit the texture externally? Is there a tool to paint onto it directly from unity?

Yes a texture can be used to add penalty to a grid graph. It is simply a texture reference in Unity, so you can edit it in your favorite image editor.

Sorry to not follow up on this for so long, I was finally able to get back to this. I’ve upgraded to 3.2.4 I did the ConfigureTagsAsMultiple but it didn’t seem to do what I needed. You talked about possibly adding the Priority order, I think that would solve my problem, did that get into 3.2.4? Is is still on the todo list?

Oh how about that, it looks like I was able to solve what I need by marking the overlapped zone as Apply on Start (true) and Apply on Scan (False). So in playing mode the inner layer gets applied over the top.

Nice approach. Works for now. Still on the ToDo list though.

Hi Aron,

sorry to revive an old thread, but i am looking for the exact same functionality.
I tried drastick’s solution to disable Apply on Scan, but i cant seem to get it working.
My player keeps walking straight through the water area.

Is it in the pro version perhaps? Or any advise on how to work around it?
Any help is greatly appreciated.

kind regards, and thanks for a fantastic product offcourse :wink: