What I have found is that setting the tag to 1 works perfectly, but setting it to anything else will always result in spawnPos returning Vector3.zero.
Is there anything obvious that I`m doing wrong?
Note that the tags field is a bitmask so to make it possible to walk on tag 1 you would set it to “1 << 1”, to make it possible to walk on tag 5, 7 and 14 you would set it to “1 << 5 | 1 << 7 | 1 << 14”.
The default value for the field is “-1” which in binary is represented as 111111… i.e all bits are ones so all tags are enabled.
Thanks for the response. I did try and bit shift as well with the same result. It’s not that I want the nodes to be not walkable, I just need them to be excluded from a search.
EDIT: Ok figured it out
GUO should have been this :
public class NoSpawnZoneGUO : GraphUpdateObject
{
public override void Apply(GraphNode node)
{
//Debug.LogError(node.Tag);
node.Tag = 1 << 2;
}
}