Using Arrays in Live Config

You can add an array to your schema like this:

project.schema.json:

"DemoStringArray":
	{
		"type": "array",
		"items": {
			"type": "string"
		},
		"default": ["1","2","3","4","5"],
		"description": "This is a string array live config"
	},
"DemoNumberArray":
	{
		"type": "array",
		"items": {
			"type": "number"
		},
		"default": [1,2,3,4,5],
		"description": "This is a number array live config"
	},
"DemoBoolArray":
	{
		"type": "array",
		"items": {
			"type": "boolean"
		},
		"default": [true, false, false, true, false],
		"description": "This is a bool array live config"
	}

You can override array elements like this:

project.override.json:

{
	"DemoStringArray": [
		"5","4","3","2","1"
	],
	"DemoNumberArray": [
		5, 4, 3, 2, 1
	],
	"DemoBoolArray": [
		false, true, false, false, true
	]
}

Note that the array elements are wrapped in [] and not {}

Supported array element types are:

bool, string, number, integer

All elements of an array must be of the same type, you cannot mix types within an array.

To read an array from live config in blueprints using the special "GetGameDataAttributeValueAsArray" nodes, like this:

Last updated