title: Hide/show panel using dropdown Unity
body: <p>I just started a unity project for some basic game stuff.</p>
  
  <p>This might be wrong question or invalid process.</p>
  
  <p>I have done hide/show panel on button click, Now I want to hide/show after value change of dropdown.</p>
  
  <p>I have two panel, one for basic info and other for security info. And after select dropdown value I want to display one of these panel and hide second panel.</p>
  
  <p>But I have no idea how to achieve that.</p>
  
  <p>I am tring some basic logic and stuck on that.</p>
  
  <p>What I did:</p>
  
  <pre><code>using UnityEngine;
  using UnityEngine.UI;
  using UnityEngine.Events;
  using System.Collections;
  
  public class WithrowModalPanel : MonoBehaviour
  {
  
      public Button cancelButton;
      public GameObject modalPanelObject;
      public GameObject modalPanelObjectAdvance;
      public Dropdown myDropdown;
  
      private static WithrowModalPanel modalPanel;
  
      public static WithrowModalPanel Instance()
      {
          if (!modalPanel)
          {
              modalPanel = FindObjectOfType(typeof(WithrowModalPanel)) as WithrowModalPanel;
              if (!modalPanel)
                  Debug.LogError("There needs to be one active ModalPanel script on a GameObject in your scene.");
          }
  
          return modalPanel;
      }
  
      void Update()
      {
          switch (myDropdown.value)
          {
              case 1:
                  Debug.Log("Basic panel!");
                  modalPanelObject.SetActive(true);
                  modalPanelObjectAdvance.SetActive(false);
                  break;
  
              case 2:
                  Debug.Log("Advance panel!");
                  modalPanelObjectAdvance.SetActive(true);
                  modalPanelObject.SetActive(false);
                  break;
          }
      }
  }
  </code></pre>
  
  <p>I just stared unity and didnt have much idea about its structure. </p>