SharpNav.NodePool.GetNodeIdx C# (CSharp) Method

GetNodeIdx() public method

Gets the id of the node.
public GetNodeIdx ( NavNode node ) : int
node NavNode The node
return int
        public int GetNodeIdx(NavNode node)
        {
            if (node == null)
                return 0;

            for (int i = 0; i < nodes.Count; i++)
            {
                if (nodes[i] == node)
                    return i + 1;
            }

            return 0;
        }