Skip to content

0kk470/Unity_AccordionUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AccordionUI


UnityVersion : 2017.4.14f


Note

This is based on ChoMPi 's work.

You can check more information on this topic

Usage

Just download the project and see the demo scene.

  • demo

img

  • AddListener

Adding a listener to this script is similar to UGUI's Button.

   public class yourUIClass:MonoBehaviour
   {
       private UIAccordion m_UIAccordion;

       private void Awake()
       {
           m_UIAccordion = GetComponent<UIAccordion>();
           m_UIAccordion.onSelectElement.AddListener(OnElementSelect);
       }

       private void OnDestroy()
       {
           m_UIAccordion.onSelectElement.RemoveListener(OnElementSelect);
       }
       private void OnElementSelect(int index)
       {
           Debug.Log("New Element Index:" + index);
       }
   }

About

An UGUI Extension based on ChoMPi's implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages