> For the complete documentation index, see [llms.txt](https://cowsinss-organization.gitbook.io/fps-engine-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cowsinss-organization.gitbook.io/fps-engine-documentation/content/03.-content/03.8-ui/cowsinsbutton.md).

# 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 %}
