[add] first
This commit is contained in:
15
assets/script/framework/util/staticBatch.ts
Normal file
15
assets/script/framework/util/staticBatch.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { _decorator, Component, Node, BatchingUtility } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('StaticBatch')
|
||||
export class StaticBatch extends Component {
|
||||
|
||||
@property([Node])
|
||||
needBatches: Node[] = [];
|
||||
|
||||
start () {
|
||||
this.needBatches.forEach((node)=>{
|
||||
BatchingUtility.batchStaticModel(node, this.node);
|
||||
})
|
||||
}
|
||||
}
|
12
assets/script/framework/util/staticBatch.ts.meta
Normal file
12
assets/script/framework/util/staticBatch.ts.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "d5c7efbb-b2b1-4245-941f-009be3c9110a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"moduleId": "project:///assets/script/framework/util/staticBatch.js",
|
||||
"simulateGlobals": []
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user