RuralPowerCompetition_yizhe.../RuralPowerCompetition_yizheng1/Assets/ValDate.cs

34 lines
840 B
C#

using FileChecker;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ValDate : MonoBehaviour
{
string dirPath = "";
string resPath = "RuralPowerCompetition_Data\\StreamingAssets\\file.res";
bool fileChecked = false;
void Awake()
{
dirPath = AppDomain.CurrentDomain.BaseDirectory;
fileChecked = FileValdate.Valdate(dirPath, resPath);
Debug.Log("====================");
Debug.Log(dirPath + "\\" + resPath);
Debug.Log(fileChecked);
Debug.Log("====================");
if (!fileChecked)
{
//Application.Quit();
}
}
//void OnGUI()
//{
// GUILayout.Label(dirPath);
// GUILayout.Label(resPath);
// GUILayout.Label(fileChecked.ToString());
//}
}