Collection Prototype
- All custom collections used in the game need to be registered in this component.
- After registering a collection prototype named
name, you can create a collection namednamein the scene. At this point, a variable namedC_namewill be automatically created in-game, which can be modified using the script's Variables Module.
TIP
- If you only register the collection prototype but do not create any corresponding collections in the scene, the corresponding variable will not be created.
- If you need to register a collection prototype named
nameand do not want to create a corresponding collection in the scene, only wishing to control its quantity via script, you can create a collection namednamein the scene and disable itsTriggerandRenderer.
Reset Timing
- Type:
On Life Start | On Restart - Default:
On Life Start
Controls when the collection is reset.
TIP
On Life Start: After the player dies, all collections of this type in the level are reset, and the player's count of this collection type is reset to 0 (e.g., the officialRed, Green, Blue Keys).On Restart: Collections of this type and the player's count of this collection type are not reset after the player dies; they are only reset when the level is restarted (e.g., the officialCyan, Yellow, Magenta Keys).
Collection Name
- Type:
string - Default: Empty
Please be sure to only fill in ASCII characters and do not use duplicate names.
Priority
- Type:
int - Default:
0
Determines the display order of the collections:
- The priorities for the Red, Green, Blue, Cyan, Magenta, and Yellow keys are
10,20,30,40,50, and60respectively. - For collections with different priorities, the one with the lower priority comes first.
- For collections with the same priority, the one that appears earlier in the map editor's list comes first, and keys are displayed last.
Icon
- Type:
Texture - Default: Empty
The collection icon displayed in the bottom-left corner of the UI.
Always Show
- Type:
bool - Default:
false
Whether to still display when the collection count is 0.
Show Max Count
- Type:
bool - Default:
false
Whether to display the total count of this type of collection in the scene.