REGISTER_RESOURCE_BUILD_TASK_FACTORY
Registers a build task factory for resources. The function should return an object (msgpack map) with the following fields: ``` { // returns whether the specific resource should be built shouldBuild = func(resourceName: string): bool, // asynchronously start building the specific resource. // call cb when completed build = func(resourceName: string, cb: func(success: bool, status: string): void): void } ```
CFX
Signature
lua
RegisterResourceBuildTaskFactory(factoryId, factoryFn)
-- returns voidParameters
| Name | Type | Description |
|---|---|---|
| char* | The identifier for the build task. | |
| func | The factory function. |
Usage
lua
RegisterResourceBuildTaskFactory(factoryId, factoryFn)Generated from the native name, hash, and parameter list. Add a real example.
Details
- Hash
- API set
- Source
- cfx
Source: cfx
