Fix directory intialization
This commit is contained in:
parent
7cea4cd4e8
commit
7ed2f43346
@ -7,7 +7,7 @@ using UnityEngine;
|
||||
public class Main : MonoBehaviour
|
||||
{
|
||||
#region Constants
|
||||
string capturedFramesPath = Path.Combine(Application.dataPath, "..", "..", "Trees");
|
||||
string capturedFramesPath;
|
||||
#endregion
|
||||
|
||||
#region Camera GUI fields
|
||||
@ -141,11 +141,12 @@ public class Main : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
capturedFramesPath = Path.Combine(capturedFramesPath, tree1.name);
|
||||
|
||||
bool exists = Directory.Exists(capturedFramesPath);
|
||||
if (!exists) Directory.CreateDirectory(capturedFramesPath);
|
||||
capturedFramesPath = Path.Combine(Application.dataPath, "..", "..", "Trees", tree1.name);
|
||||
|
||||
if (!Directory.Exists(capturedFramesPath))
|
||||
{
|
||||
Directory.CreateDirectory(capturedFramesPath);
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//ground
|
||||
|
Loading…
Reference in New Issue
Block a user