/// <summary>
    ///  Get the current settings from the hard drive.
    /// </summary>
    /// <returns>the settings string</returns>
    public string retrievesetting()
    {
        string output = FleetBuilder.get <string>("Settings");

        FleetBuilder.read();
        Debug.Log(output);
        settext(output);
        current = output;
        updateleftdisplay();
        return(output);
    }
 /// <summary>
 /// gets the current player progress through the levels.
 /// </summary>
 void GetCompleted()
 {
     FleetBuilder = IORoot.findIO("fleet1");
     FleetBuilder.read();
     completedthrough = FleetBuilder.get <int>("Completednum");
     Debug.Log(completedthrough);
 }
 /// <summary>
 /// Fill out all the information stored and disable unnessercary code.
 /// </summary>
 void Awake()
 {
     if (FindObjectsOfType(GetType()).Length > 1)
     {
         Destroy(gameObject);
     }
     if (steamManager == null)
     {
         steamManager = GameObject.Find("SteamManager");
     }
     if (issteamversion == false)
     {
         Debug.Log("setupoculus");
         if (steamManager)
         {
             steamManager.SetActive(false);
         }
     }
     FleetBuilder = IORoot.findIO("fleet1");
     FleetBuilder.read();
     crosslevelholder           = GameObject.Find("MainMenuHolder").GetComponent <MainMenuValueHolder>();
     steamManager               = GameObject.Find("SteamManager");
     stkman                     = GetComponent <VRTK_SDKManager>();
     stkman.LoadedSetupChanged += new VRTK_SDKManager.LoadedSetupChangeEventHandler(Load);
     if (FleetBuilder.get <bool>("LeftMode"))
     {
         GameObject lefthand = stkman.scriptAliasLeftController;
         stkman.scriptAliasLeftController  = stkman.scriptAliasRightController;
         stkman.scriptAliasRightController = lefthand;
         FleetBuilder.read();
     }
 }
    void Deploy_Current_Fleet(GameObject loadObj)
    {
        int o = FleetBuilder.get <int>(loadObj.name + "num");

        Debug.Log(o);
        Debug.Log(loadObj.name + "num");
        for (int a = 0; a < o; a++)
        {
            string objparent = FleetBuilder.get <string>(loadObj.name + a);
            float  scalex    = FleetBuilder.get <float>(loadObj.name + "scalex" + a);
            float  scaley    = FleetBuilder.get <float>(loadObj.name + "scaley" + a);
            float  scalez    = FleetBuilder.get <float>(loadObj.name + "scalez" + a);
            Debug.Log("Attachpoint " + (a + 1) + " " + objparent);
            if (objparent != "nothing")
            {
                GameObject gam = null;

                bool state = false;
                //  ShipListPage2(Frigates)
                for (int i = 0; i < shipstodeploy.Count; i++)
                {
                    if (shipstodeploy[i].name == objparent)
                    {
                        gam   = shipstodeploy[i].GetComponent <WeaponBaseClass>().copy();
                        state = shipstodeploy[i].transform.parent.gameObject.GetActive();
                    }
                }

                if (gam)
                {
                    if (loadObj.transform.Find("Attachpoint " + (a + 1)).transform.childCount < 1)
                    {
                        gam.SetActive(true);
                        gam.transform.parent        = loadObj.transform.Find("Attachpoint " + (a + 1));
                        gam.transform.localPosition = new Vector3(0, 0, 0);
                        gam.transform.localScale    = new Vector3(100, 100, 100);
                        gam.transform.localRotation = new Quaternion(0, 0, 0, 0);
                        gam.GetComponent <WeaponBaseClass>().startget();
                        gam.transform.parent.gameObject.SetActive(state);
                        Debug.Log(gam);
                    }
                }
            }
        }
        FleetBuilder.write();
        string objparent1 = FleetBuilder.get <string>(loadObj.name + "0");

        Debug.Log(objparent1);
    }