Prefab.OptimizationPolicy Enum

Module: cc Parent Module: cc

An enumeration used with the Prefab.optimizationPolicy to specify how to optimize the instantiate operation.

Available since 1.10.0

Index

  • AUTO
  • SINGLE_INSTANCE
  • MULTI_INSTANCE

Details

AUTO

The optimization policy is automatically chosen based on the number of instantiations. When you first create an instance, the behavior is the same as SINGLE_INSTANCE. MULTI_INSTANCE will be automatically used after multiple creation.

meta description
Type Number
Defined in cocos2d/core/assets/CCPrefab.js:41
SINGLE_INSTANCE

Optimize for single instance creation.
This option skips code generation for this prefab. When this prefab will usually create only one instances, please select this option.

meta description
Type Number
Defined in cocos2d/core/assets/CCPrefab.js:50
MULTI_INSTANCE

Optimize for creating instances multiple times.
This option enables code generation for this prefab. When this prefab will usually create multiple instances, please select this option. It is also recommended to select this option if the prefab instance in the scene has Auto Sync enabled and there are multiple instances in the scene.

meta description
Type Number
Defined in cocos2d/core/assets/CCPrefab.js:61

results matching ""

    No results matching ""