Пример #1
0
        public static void Delete(string path)
        {
            var file = FileManager.Find(path);

            if (!file.IsNull())
            {
                file.Delete();
            }
        }
Пример #2
0
        public static T GetAsset <T>(string name, bool showWarnings = true) where T : UnityObject
        {
            FileData file = FileManager.Find(name, showWarnings);

            if (file != null)
            {
                return(file.GetAsset <T>());
            }
            return(default(T));
        }
Пример #3
0
        public static string GetGUID(string name, bool showWarnings = true)
        {
            FileData file = FileManager.Find(name, showWarnings);

            if (file != null)
            {
                return(file.GetGUID());
            }
            return("");
        }
Пример #4
0
        public static FileData Get(UnityObject target, bool showWarnings = false)
        {
            string path = FileManager.GetPath(target, false);

            return(FileManager.Find(path, showWarnings));
        }
Пример #5
0
        public static FileData Get(UnityObject target, bool showWarnings = false)
        {
            string path = FileManager.dataPath.Replace("Assets", "") + FileManager.GetPath(target);

            return(FileManager.Find(path, showWarnings));
        }