Wings Engine

Project Class

The Project object corresponds to the current project. Through this object, you can obtain the project name, project parameters, modify project parameters, and more.

The Project object is created and bound by the system, so users do not need to construct it manually. It can be accessed directly via this.project.

1
2
3
4
5
6
class Button {
init() {
console.log(this.project.name);
}
}
export default Button;

name

Get the project name.

1
readonly name: string

getVariable()

Get project parameters.

1
2
3
4
5
/**
* Get project parameters
* @param key Parameter name
*/
getVariable(key: string): string

setVariable()

Set project parameters.

1
2
3
4
5
6
/**
* Set project parameters
* @param key Parameter name
* @param val Parameter value
*/
setVariable(key: string, val: string): void