Repository: godotengine/godot
File: core/config/project_settings.cpp (C++)

Code before:
			return path.replace("res:/", resource_path);
		}
		return path.replace("res://", "");
	} else if (p_path.begins_with("user://")) {
		String data_dir = OS::get_singleton()->get_user_data_dir();
		if (!data_dir.is_empty()) {
			return p_path.replace("user:/", data_dir);
		}
		return p_path.replace("user://", "");
	}

	return p_path;
}

bool ProjectSettings::_set(const StringName &p_name, const Variant &p_value) {
	_THREAD_SAFE_METHOD_

	// Early return if value hasn't changed (unless it's being deleted)
	if (p_value.get_type() != Variant::NIL) {
		if (props.has(p_name) && props[p_name].variant == p_value) {
			return true;
		}
	}

#ifndef DISABLE_DEPRECATED
	if (p_name == SNAME("application/config/features")) {
		const PackedStringArray features = p_value;
		for (const String &feat : features) {
			if (feat.contains_char('.')) {
				if (feat.get_slicec('.', 1).to_int() < 6) {
					// Enable MeshInstance3D compat for projects created before 4.6.
					set_setting("animation/compatibility/default_parent_skeleton_in_mesh_instance_3d", true);
				}
				break;
			}
		}
	}
#endif

	if (p_value.get_type() == Variant::NIL) {
		props.erase(p_name);
		if (p_name.operator String().begins_with("autoload/")) {
			String node_name = p_name.operator String().get_slicec('/', 1);
			if (autoloads.has(node_name)) {
				remove_autoload(node_name);
			}
		} else if (p_name.operator String().begins_with("global_group/")) {
			String group_name = p_name.operator String().get_slicec('/', 1);
			if (global_groups.has(group_name)) {
				remove_global_group(group_name);
			}

Review comment (suggestion):
That this is checked in `ProjectSettings::_set` every time horrifies me, but is there really any other way?
```suggestion
	if (unlikely(p_name == SNAME("application/config/features"))) {
```

Code after:
			return path.replace("res:/", resource_path);
		}
		return path.replace("res://", "");
	} else if (p_path.begins_with("user://")) {
		String data_dir = OS::get_singleton()->get_user_data_dir();
		if (!data_dir.is_empty()) {
			return p_path.replace("user:/", data_dir);
		}
		return p_path.replace("user://", "");
	}

	return p_path;
}

bool ProjectSettings::_set(const StringName &p_name, const Variant &p_value) {
	_THREAD_SAFE_METHOD_

	// Early return if value hasn't changed (unless it's being deleted)
	if (p_value.get_type() != Variant::NIL) {
		if (props.has(p_name) && props[p_name].variant == p_value) {
			return true;
		}
	}

	if (p_value.get_type() == Variant::NIL) {
		props.erase(p_name);
		if (p_name.operator String().begins_with("autoload/")) {
			String node_name = p_name.operator String().get_slicec('/', 1);
			if (autoloads.has(node_name)) {
				remove_autoload(node_name);
			}
		} else if (p_name.operator String().begins_with("global_group/")) {
			String group_name = p_name.operator String().get_slicec('/', 1);
			if (global_groups.has(group_name)) {
				remove_global_group(group_name);
			}
		}
	} else {
		if (p_name == CoreStringName(_custom_features)) {
			Vector<String> custom_feature_array = String(p_value).split(",");
			for (int i = 0; i < custom_feature_array.size(); i++) {
				custom_features.insert(custom_feature_array[i]);
			}

			_version++;
			_queue_changed(p_name);
			return true;
		}

		{ // Feature overrides.
			int dot = p_name.operator String().find_char('.');