params["_unit", "_rank"];

switch (_rank) do {
	case "soldado": {
		_unit setObjectTextureGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\soldado_co.paa"];
		_unit setObjectMaterialGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\soldado.rvmat"];
	};
	case "cabo": {
		_unit setObjectTextureGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\cabo_co.paa"];
		_unit setObjectMaterialGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\cabo.rvmat"];
	};
	case "3sarg": {
		_unit setObjectTextureGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\3sarg_co.paa"];
		_unit setObjectMaterialGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\3sarg.rvmat"];
	};
	case "2sarg": {
		_unit setObjectTextureGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\2sarg_co.paa"];
		_unit setObjectMaterialGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\2sarg.rvmat"];
	};
	case "1sarg": {
		_unit setObjectTextureGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\1sarg_co.paa"];
		_unit setObjectMaterialGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\1sarg.rvmat"];
	};
	case "sub": {
		_unit setObjectTextureGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\sub_co.paa"];
		_unit setObjectMaterialGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\sub.rvmat"];
	};
	case "2ten": {
		_unit setObjectTextureGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\2ten_co.paa"];
		_unit setObjectMaterialGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\2ten.rvmat"];
	};
	case "1ten": {
		_unit setObjectTextureGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\1ten_co.paa"];
		_unit setObjectMaterialGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\1ten.rvmat"];
	};
	case "capten": {
		_unit setObjectTextureGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\capten_co.paa"];
		_unit setObjectMaterialGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\capten.rvmat"];
	};
	case "corveta": {
		_unit setObjectTextureGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\corveta_co.paa"];
		_unit setObjectMaterialGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\corveta.rvmat"];
	};
	case "fragata": {
		_unit setObjectTextureGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\fragata_co.paa"];
		_unit setObjectMaterialGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\fragata.rvmat"];
	};
	case "mareguerra": {
		_unit setObjectTextureGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\mareguerra_co.paa"];
		_unit setObjectMaterialGlobal [1, "\braf\braf_insignia\uniform\marine\officer_rank\mareguerra.rvmat"];
	};
	default {
		_unit setObjectTextureGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\soldado_co.paa"];
		_unit setObjectMaterialGlobal [0, "\braf\braf_insignia\uniform\marine\enlisted_rank\soldado.rvmat"];
	};
};