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

Navigation

</aside>

Home Page

Overview

Levels Creation

Custom Stage

Enemy

Hat Skins

Gun Skins

Monetization (Ads & IAP)

How to add hat skins

  1. Find the Enemy prefab in the Assets/Project Files/Game/Prefabs/Enemy and Obstacles folder and drag it into the hierarchy window. Select it.

  2. On the Inspector window find the Character Enemy script, scroll to the very bottom, and find Hat Behavior -> Holder Transform field. Click Hat Holder (Transform) to reveal it in Hierarchy.

    Screenshot_8.png

  3. The object Hat Holder will be highlighted in the Hierarchy window. Drag your new skin model here (so it becomes a child of the object) like this:

    image (1).png

  4. Using the Scene window adjust the position and scale of the hat object

    Screenshot_9.png

  5. Note somewhere the skin object’s position after adjustment, we will need it later

    image (2).png

  6. Drag and drop the adjusted skin object into the Project Files/Game/Prefabs/Hats folder - prefab will be created

    image.png

  7. While a new hat prefab is selected press the Add Component button in the Inspector window, type in Rigidbody in the search area, and select it.

    Untitled

    Untitled

  8. Adjust the Mass value on the Rigidbody component (5-7 works well for hats). You can change other settings, it will affect how the hat behaves after being knocked out from the head.

    Untitled

  9. Now you can delete the Enemy prefab from the scene, we don’t need it anymore

  10. Select the Hat Skins Database object located in the Project Files/Data/Skins folder.

    image.png

  11. Click the little + button at the bottom of the list to add another skin.

    Untitled

  12. Assign the preview image, the prefab created in Step 6, and the Hat Offset value noted in Step 5. This database will provide skins to other game modules in our case to the store.

    image.png

  13. Select the Skins Store Database object located in the Project Files/Data/Skins folder. This database stores settings of all products displayed in the store.

    image.png

  14. Select the Hats tab at the top of the Product part of the window

    Untitled

  15. Click the little + button at the bottom of the Products section to add another product.

    Untitled

  16. Click the product called New Element to configure the fields:

    1. Name - a name of the product (just for your convenience)

    2. Opened Sprite - image of your product when it’s purchased

    3. Locked Sprite - image of your product when not purchased

    4. 2D Sprite Preview - leave it blank as the store uses 3D preview in this case.

    5. Skin Id - select the required product form the list.

    6. Purchase Type - the product can be purchased using currency or by watching rewarded videos

    7. Currency - a currency used for purchasing

    8. Cost - the amount of required currency to purchase the product or amount of required RVs.

    9. Tab - select the available store tab. You can configure tabs in the Tabs section above.

    10. Is Dummy - if the variable is checked product won’t be interactable

      image.png