//---------------------------------------------------------------------------------------------------------------------
        //Path can point to a file or a folder.
        //If it points to a file, then the folder will be automatically detected
        private static void FindFolderAndImages(string path, out string folder, out List <WatchedFileInfo> imageFiles)
        {
            Assert.IsFalse(string.IsNullOrEmpty(path));
            //Convert path to folder here
            folder = path;
            FileAttributes attr = File.GetAttributes(path);

            if (!attr.HasFlag(FileAttributes.Directory))
            {
                folder = Path.GetDirectoryName(folder);
            }

            imageFiles = WatchedFileInfo.FindFiles(folder,
                                                   StreamingImageSequencePlayableAsset.GetSupportedImageFilePatterns()
                                                   );
        }