# CowsinsButton

<mark style="background-color:orange;">New in FPS Engine 1.2</mark>

CowsinsButton extends the base Unity Button class and can be used for MainMenus and UI, provides extended functionalities to switch scenes and sections.

* <mark style="color:purple;">clickSFX</mark>: Sound Effect to play on Clicking.
* <mark style="color:purple;">buttonType</mark>: Select the behaviour of the button.
  * SECTION TRANSITION: Allows you enable and disable gameObjects in the UI. You can add a CanvasGroup to these objects to seamlessly play a fade in effect
  * SCENE TRANSITION: Load new Scenes. Notice that your desired scene must be assigned in the Build Settings. [More info.](https://docs.unity3d.com/Manual/BuildSettings.html)
  * OTHER: Default Button behaviour.

### SECTION TRANSITION

* <mark style="color:purple;">sectionToEnable</mark>: GameObject to enable. You can add a CanvasGroup to this object to seamlessly play a fade in effect
* <mark style="color:purple;">sectionsToDisable</mark>: GameObjects to disable. No fade effect is played on these.

### SCENE TRANSITION&#x20;

* <mark style="color:purple;">sceneIndex</mark>: Index of the scene to load.

{% hint style="info" %}
Please ensure the Scene Index corresponds to a valid scene in the build settings.

File -> Build Settings

[More info.](https://docs.unity3d.com/Manual/BuildSettings.html)
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://cowsinss-organization.gitbook.io/fps-engine-documentation/content/03.-content/03.8-ui/cowsinsbutton.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
