So i have a folder I’m trying to rename (I read i should use Directory.move to do this).
I use Directory.Move(“ExampleA”,“New Folder”) - Im simplifying this for explanation.
Where “New Folder” is what “ExampleA” Should be renamed to, this works, it moves the directory and it’s contents but it’s also leaving the “ExampleA” folder still there, and when i try and delete it it says It Doesn’t exist.
Full Code here
Directory.Move(Application.dataPath + "/Photos/" + GameObject.Find("Camera").GetComponent<CameraController>().cardNames[assignmentButton], Application.dataPath + "/Photos/" + renameInput.text);
#if UNITY_EDITOR UnityEditor.AssetDatabase.Refresh(); #endif
to refresh things in the UI but that has no effect.