public bool SaveBinaryData(Scoring_Block blk)
 {
     return(BinarySerializor.SerializeToBinary <Scoring_Block>(Application.streamingAssetsPath + "/Data/ScoreSystem.sco", blk));
 }
    //Don't use this at runtime. PLEASE.
    public void SaveScene(bool edit = false)
    {
        int world, level;

        if (!edit)
        {
            //If the scenes are the deprecated scenes we are using.
            if (EditorSceneManager.GetActiveScene().name.Contains("Level"))
            {
                //OLD METHOD
                Vector2 temp = updateinternalworldlevel();

                world = (int)temp.x;
                level = (int)temp.y;
            }
            else
            {
                //this must be the new method, aka using the masterscene
                world = new_world;
                level = new_level;
                GameObject GameSystem = GameObject.FindGameObjectWithTag("GameController");
                GameSystem.GetComponent <ScoreSystem>().World = world;
                GameSystem.GetComponent <ScoreSystem>().level = level;
            }
        }
        else
        {
            world = Current_World;
            level = Current_Level;
            GameObject GameSystem = GameObject.FindGameObjectWithTag("GameController");
            GameSystem.GetComponent <ScoreSystem>().World = world;
            GameSystem.GetComponent <ScoreSystem>().level = level;
            SaveParentFolder = Application.streamingAssetsPath + "/Data";
        }

        Scene_Block saveData = new Scene_Block();


        //find all the blocks
        List <Transform>  blks      = new List <Transform>();
        List <block_data> temp_blks = new List <block_data>();

        Transform[] allobj = GameObject.FindObjectsOfType <Transform>();
        foreach (Transform obj in allobj)
        {
            if (obj.gameObject.activeInHierarchy)
            {
                //we use game component snapobject to identify if its a block...
                if (obj.GetComponent <SnapObject>() != null || obj.CompareTag("PlacedWallBlock"))
                {
                    if (obj.root != GameObject.Find("FakeScene").transform)
                    {
                        blks.Add(obj);
                    }
                }
            }
        }
        //create and place each new block_data
        foreach (Transform blk in blks)
        {
            block_data data = new block_data();
            data.pos   = new custom_vector_4(blk.transform.position);
            data.scale = new custom_vector_4(blk.transform.localScale);
            data.type  = ParseBlockType(blk.gameObject);

            //hardcore handle portals
            if (data.type == blockType.portal)
            {
                data.portal_ref_pos = new custom_vector_4(blk.GetComponent <Portal>().OtherPortal.transform.position);
            }

            if (blk.GetComponent <OneWayBlock>() != null)
            {
                data.direction = blk.GetComponent <OneWayBlock>().currentDirection;
            }
            else if (blk.GetComponent <OneWayGate>() != null)
            {
                data.direction = blk.GetComponent <OneWayGate>().currentDirection;
            }
            temp_blks.Add(data);
        }
        saveData.blocks = temp_blks.ToArray();
        saveData.world  = world; saveData.level = level;
        //now we actually save the data.
        if (BinarySerializor.SerializeToBinary <Scene_Block>(SaveParentFolder + "/" + world + "-" + level + ".dat", saveData))
        {
            Debug.Log("Successfully saved");
        }
    }