Files
cocos4/cocos/rendering/post-process/components/post-process-setting.ts
T
PP 509d73b27d merge branch v3.8.0-aot (#15421)
* PR1: add explicit function return type (#15311)

* PR4: add explicit function return type (#15314)

* [ci skip][AUTO]: Automated code generating update: 8843bfe54cd3f8e6f84432948716c8d130ecb233  (#15314) (#15357)

Co-authored-by: cocos-robot <cocos-robot@cocos.com>

* add function return type

* fix version checking

* fix return type

---------

Co-authored-by: Cocos Robot <48829427+cocos-robot@users.noreply.github.com>
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2023-06-13 18:08:45 +08:00

26 lines
772 B
TypeScript

import { ccclass, executeInEditMode, requireComponent } from '../../../core/data/decorators';
import { Component } from '../../../scene-graph';
import { PostProcess } from './post-process';
@ccclass('cc.PostProcessSetting')
@requireComponent(PostProcess)
@executeInEditMode
export class PostProcessSetting extends Component {
static _default: PostProcessSetting | undefined
static get default (): PostProcessSetting {
if (!this._default) {
this._default = new this();
}
return this._default;
}
onEnable (): void {
const pp = this.getComponent(PostProcess);
pp?.addSetting(this);
}
onDisable (): void {
const pp = this.getComponent(PostProcess);
pp?.removeSetting(this);
}
}