I have a number of files I want to import to my project, and the main difficulty lies in setting up parameters for each track based on a configuration file. I create my parameters like this:
const parameters = [“A”, “B”, “C”, …]
var event = studio.window.browserCurrent();
parameters.forEach(function (parameter) {
event.addGameParameter({
name: parameter,
type: studio.project.parameterType.User,
min: 0,
max: 1
});
});
However, when importing files later, there’s no way to reference them by name:
var event = studio.window.browserCurrent();
var parameters = studio.project.model.GameParameter.findInstances();
parameters.forEach(function (parameter) {
console.log(parameter.name); // no such property on parameter
});
How do I know which parameter is which without hardcoding parameter GUIDs into my script? Remembering the parameter instances is a bit of a no-go since I want to create the parameters once and be able to reference them in subsequent script executions. Overall, the scripting API seems a bit lacking, is it even still supported?