dbrizov / NaughtyAttributes

Attribute Extensions for Unity
MIT License
4.53k stars 464 forks source link

[Request] NavMeshArea drawer Attribute #318

Open XardoX opened 2 years ago

XardoX commented 2 years ago

It would be nice to add NavMeshArea attribute that works just like Layer attribute

image

TylerTemp commented 6 months ago

I have one that can work together with NaughtyAttributes installed:

[NavMeshAreaMask]
public int areaMask;

[NavMeshArea]  // then you can use `areaSingleMask1 | areaSingleMask2` to get multiple masks
public int areaSingleMask;

[NavMeshArea(false)]  // then you can use `1 << areaValue` to get areaSingleMask
public int areaValue;

[NavMeshArea]  // then you can use `NavMesh.GetAreaFromName(areaName)` to get areaValue
public int areaName;

nav_mesh_area_mask

nav_mesh_area