示例#1
0
 private void OnEnable()
 {
     skin = (GUISkin)Resources.Load(EasyMotionConstants.pluginSkin);
     dropdownControllers = EasyMotionUtility.FindActiveEnabledDropdownControllers();
     dropdownIcon        = (Texture2D)Resources.Load("dropdown");
     availableDropdowns  = EasyMotionUtility.FindActiveDropdowns();
     GeneratePreviews();
     currentScene = SceneManager.GetActiveScene().name;
 }
示例#2
0
 private void CheckIfDropdownCountChanged()
 {
     Dropdown[] currentDropdowns = EasyMotionUtility.FindActiveDropdowns();
     if (availableDropdowns.Length != currentDropdowns.Length)
     {
         EasyMotionUtility.ReOpen <EasyMotionSerialPortSetupWindow>(
             "Serial Port Setup",
             "Select the dropdown the player will use to select their motion platform's serial port");
     }
 }
    private bool NeededComponentsExist()
    {
        Toggle[]   toggles               = EasyMotionUtility.FindActiveToggles();
        Dropdown[] dropdowns             = EasyMotionUtility.FindActiveDropdowns();
        bool       neededComponentsExist = true;

        if (toggles.Length < 1 || dropdowns.Length < 1)
        {
            neededComponentsExist = false;
        }
        return(neededComponentsExist);
    }