예제 #1
0
    public static void SaveGestureQuantity(MasterControl mastercontrol)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        //string path = Application.persistentDataPath + "/testcontrol.banana";
        string     path   = "C:/Users/Andrei/Documents/Unity Games/Hand Gesture Recognition/GestureAlbums/_gestureQuantity.banana";
        FileStream stream = new FileStream(path, FileMode.Create);

        GestureQuantityData data = new GestureQuantityData(mastercontrol);

        formatter.Serialize(stream, data);
        stream.Close();
    }
예제 #2
0
    public static GestureQuantityData LoadGestureQuantity()
    {
        //string path = Application.persistentDataPath + "/testcontrol.banana";
        string path = "C:/Users/Andrei/Documents/Unity Games/Hand Gesture Recognition/GestureAlbums/_gestureQuantity.banana";

        if (File.Exists(path))
        {
            BinaryFormatter formatter = new BinaryFormatter();
            FileStream      stream    = new FileStream(path, FileMode.Open);

            GestureQuantityData data = formatter.Deserialize(stream) as GestureQuantityData;
            stream.Close();

            return(data);
        }
        else
        {
            Debug.LogError("Save file not found in " + path);
            return(null);
        }
    }
예제 #3
0
    public void LoadGestureQuantity()
    {
        GestureQuantityData data = GestureSaveSystem.LoadGestureQuantity();

        gestureQuantity = data.gestureQuantity;
    }