> For the complete documentation index, see [llms.txt](https://docs.candy-smith.com/main/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.candy-smith.com/main/sweet-candy-sugar-match-3/add-elements/adding-layers-to-the-block.md).

# Adding layers to the block

1. Create a new object on the scene in 0,0,0 position

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXcldBvH0-WxXW5LdJrH2Oz8wv4xN-XwNCprkyLFarOBp_71-92Y39BIOoQt4nEVwsVHAVuvMVp1e3EyanTeX232wB31zeOxYmdl0S9iKNHDG1JGyxp7GU9ux4yWmmxq3LC2CzuVAhHjvLNm_e2YnoAAjA?key=DNdTmeWNBKtU0SEsz_zu5A" alt=""><figcaption></figcaption></figure>
2. Rename gameObject to the same name of the block from the SquareTypes enum<br>

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXdyvrzHRsmp8Y_KyoL2Qtm_6YAW3CXHfyJ46Hr9-VAVpbIp8BEfGzzrL-qbBdoQ6BeiiWtCjgpEFAsVGT2Sy8UiOr_udLCXVLq4J3NGtBEx8p1KiPZXf1vnIe59FaVYuvISK0haykOjkI6vy3T3lqtdoBw?key=DNdTmeWNBKtU0SEsz_zu5A" alt=""><figcaption></figcaption></figure>
3. Drag first layer block from the prefabs inward<br>

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfjzVHcafLJvxG6nFHMHVYZVo7yTnGeAbtswRxKJeeYtzbwb4JerozrEsopZAWpUeqD7m-7Q-DokVpqQE08hBMAhWroIQDqD5CrgpFopb_iNQDAcTlUzYBO3iu3j1W-CvJdtkZKVtp7flHoZTZvQiVLlHg?key=DNdTmeWNBKtU0SEsz_zu5A" alt=""><figcaption></figcaption></figure>
4. Set first layer sprite on this object or keep it
5. Duplicate the object and set second layer texture<br>

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXcxISwORPw2ZF-gp13jCByA3TQ-_fymmaQpAcSPg1LZRFKT85tpxJr3bF70cDx5ghtBq5UAKIqPNNGRKFFvi8GqKBBprz2T2Gp9V3ooOovlAGqwb0_5P__EFwbLpR6vos3u_67aQRcgFn-gngF4UsD5Q2o?key=DNdTmeWNBKtU0SEsz_zu5A" alt=""><figcaption></figcaption></figure>
6. Add Layered Block component<br>

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXdLgdbSOFPfw8U-OELlQWQrfyNv8qGw54D5VubG4X5J1jsRm_9iUhNNCplK8VDZscR9yR2qM7FKPRtIqkBycWbfVuCjIAHkwaqPbeKeNPX-VQ28jJ3Vewq_LT-hVdlhvi9zYnhXIhSTj0t-A4ELBUCehFA?key=DNdTmeWNBKtU0SEsz_zu5A" alt=""><figcaption></figcaption></figure>
7. Drab both objects to the apropriate layers of the LayeredObject<br>

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXdidWnKr4x9VNqvADK18o9CI8deDGWfZBzUex8CmSvyohuVNOfbBcjaGXF0cnEcxaaJOIecNg1MhVB4udV77qRF43WN-SYvbBdoOnWRDDvzjyKKFdjR2usn7PiRscoc_dmP7xZrPTYswiiqAzXt7w9Iuic?key=DNdTmeWNBKtU0SEsz_zu5A" alt=""><figcaption></figcaption></figure>
8. Drag it to the prefabs and delete from the scene<br>

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfwD9YxN0CtupMM-b_RSVBirVmuA_iE9TE6lEMt3CiXvzyfpkyRfwWdtPikIqfNgWMlukyEVpdFb4lbWV5-tdS-fV_06AzRH6SP9M_NBIrmS-mYFtZpEvqVu8KZB0ww5wmirmX1_dWES1BQMSjFwKvK5lU?key=DNdTmeWNBKtU0SEsz_zu5A" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.candy-smith.com/main/sweet-candy-sugar-match-3/add-elements/adding-layers-to-the-block.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
