void DoSetLayerCost() { if (_agent == null) { return; } int areaId = area.Value; if (orAreaName.Value != "") { areaId = UnityEngine.AI.NavMesh.GetAreaFromName(orAreaName.Value); } _agent.SetAreaCost(areaId, cost.Value); }