WorldToMapPosition

returns the map multidimensional index array position as a Vector2 from a Vector3 world position.

WorldToMapPosition(Vector3 _worldPosition);

Example

var _index = WorldToMapPosition(player.transform.position);