- Home /
Asked the question wrong. The problem is related to something else.
Convert System.IO to UnityEngine.Windows
I have never used UnityEngine.Windows and it seems it lacks a lot of functionality of System.IO. Can Anyone anyone explain how to convert from System.IO to UnityEngine.Windows? I've read a lot of threads on it but I think the way my save system is set up is making it difficult for me.
string subDir = Path.Combine(Application.persistentDataPath, "Saves");
string path = Path.Combine(subDir, curSaveSelected);
if (!Directory.Exists(subDir))
{
Directory.CreateDirectory(Application.persistentDataPath + "/Saves");
}
foreach (string file in Directory.GetDirectories(subDir))
{
if (Path.GetFileNameWithoutExtension(file) != "Temp")
{
//Bunch of stuff not related
Like what is the equivalent of Path.Combine, or Directory.GetDirectories, as these are not present in UnityEngine.Windows.
I really appreciate any help, Thanks.
Answer by Weightless · May 13, 2020 at 04:56 PM
Do you have using System.IO;
in your code at the top? Both Path.Combine and Directory.GetDirectories work fine for me.
I misunderstood some comments I was reading in regards to WUP. I think i'm doing something wrong with my file creation that WUP doesn't like.
Follow this Question
Related Questions
Failing Builds 0 Answers
Future compatible saveClass? 1 Answer
Save scene 1 Answer
I want to save my level progress in my quiz game 1 Answer
How to save user levels? 0 Answers