- Home /
Question by
lTimesl · Nov 23, 2020 at 07:39 PM ·
editoreditorwindowjsonsystem.io
editor loading data from json error FileNotFoundException: Could not find file
hello i am trying to create node Dialouge editor so the way it works by save and load convarsation class's which contain list of nodes
the problem i have is this exception "FileNotFoundException: Could not find file" when i try to load the file from the Resources folder its says no file but the file exist in the folder i dont know if i am doing this in the right way hope get some help thanks in advance
the function to load data and where error happen
NodesConvarsation LoadConvarsation(string convFolder, string convName, NodesConvarsation conv)
{
conv = new NodesConvarsation();
StreamReader sr = new StreamReader("Assets/Resources/Dialouge/Scriptable Objects/EditorConversations/" + convFolder + " / " + convName + ".json"); //here the problem happen
EditorJsonUtility.FromJsonOverwrite(sr.ReadToEnd(), conv);
sr.Close();
return conv;
}
Comment
Best Answer
Answer by lTimesl · Nov 24, 2020 at 04:44 PM
i found the problem there was extra white-space's in the path in the " / " it should be "/"