<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />

Navigation

</aside>

🏠 Home Page

Overview

Level Editor

Blocks

Figures

Collectables

Combo System

Skin System

Map

Lives System

UI Store

💰 Monetization (Ads & IAP)

Skin System Overview

The Skin System enables quick and flexible customization of game visuals for elements. Designed with modularity in mind, it seamlessly integrates with custom meta mechanics, allowing skins to be unlocked or rewarded through mechanisms like daily rewards, mission rewards, or any other meta systems. With intuitive editor tools, the Skin System streamlines the process of adding, changing, or removing skins, making it both accessible and efficient for designers and developers.

skins_preview.png

Skin Structure

The LevelSkinData class is used to manage the visual appearance of the game's level elements. It stores different images and colors that can be applied to the blocks within a level.

image.png

Skin Data is stored in the Level Skin Database scriptable object and contains the following variables:

Id - A unique identifier used to determine which skin should be loaded.

Preview Sprite - The sprite used in the Store UI.

image.png

Sprites - An array of SpriteData objects, each representing a different type of element sprite with associated colors.

Special Sprite - A background sprite is used as an alternative to the actual image when a Сollectable object is attached to the block.

image.png

Skin Picker Toolset

The Skin Picker is an editor toolset designed to streamline the selection of skin IDs from the database. It consists of a custom property and an editor window, which provide a visual demonstration and ID validation for a convenient and user-friendly selection process.

image.png

To apply the Skin Picker to a serializable string variable, simply add the SkinPicker attribute to it. This allows the variable to utilize the Skin Picker toolset, improving workflow efficiency when assigning skins.

skin picker.png

Methods

// GetSelectedSkin method retrieves the currently selected skin by accessing the skins database
LevelSkinData skinData = (LevelSkinData)SkinController.Instance.GetSelectedSkin<LevelSkinDatabase>();

// SelectSkin method selects a skin using an ISkinData instance or a skin ID
SkinController.Instance.SelectSkin(skinData);
SkinController.Instance.SelectSkin([skinData.ID](<http://skindata.id/>));

// UnlockSkin method unlocks a skin using an ISkinData instance or skin ID
// If the second parameter is true, the skin will be automatically selected after being unlocked
SkinController.Instance.UnlockSkin(skinData, select: false);
SkinController.Instance.UnlockSkin([skinData.ID](<http://skindata.id/>), select: false);

// IsSkinUnlocked method checks if a skin is unlocked based on its ID
if (SkinController.Instance.IsSkinUnlocked([skinData.ID](<http://skindata.id/>)))
{
		// Skin is unlocked
}

Skins Store

The Skin Store is a meta mechanic that allows players to purchase skins using in-game currency or by watching rewarded ads. Once a LevelSkinData is added to the database, you can make it available in the store by following these steps:

  1. Open the Skin Store Database in the Assets/Project Files/Data/Skins folder.
  2. Click the "+" button to add a new product or edit an existing dummy product.
  3. Update the following fields for each product:

image.png