Class FileManager
public class FileManager : MonoBehaviour
- Inheritance
-
FileManager
Fields
defaultFileName
public const string defaultFileName = "Untitled Image"
Field Value
previousFile
public File previousFile
Field Value
Properties
currentFile
public File currentFile { get; }
Property Value
currentFileIndex
public int currentFileIndex { get; }
Property Value
files
public List<File> files { get; }
Property Value
Methods
AddFile(File)
public bool AddFile(File file)
Parameters
file
File
Returns
CloseFile(File)
Closes the file, with no checks for unsaved changes.
public bool CloseFile(File file)
Parameters
file
File
Returns
CloseFile(int)
Closes the file, with no checks for unsaved changes.
public File CloseFile(int fileIndex)
Parameters
fileIndex
int
Returns
ExportAnimation(int, string)
public bool ExportAnimation(int fileIndex, string filePath)
Parameters
Returns
ExportCurrentAnimation(string)
public bool ExportCurrentAnimation(string filePath)
Parameters
filePath
string
Returns
ExportCurrentAnimationDialog()
public void ExportCurrentAnimationDialog()
ExportCurrentFrame(int, string)
public bool ExportCurrentFrame(int frameIndex, string filePath)
Parameters
Returns
ExportCurrentFrameDialog()
public void ExportCurrentFrameDialog()
ExportFrame(int, int, string)
public bool ExportFrame(int frameIndex, int fileIndex, string filePath)
Parameters
Returns
ImportDialog()
public void ImportDialog()
NewFile(int, int)
public void NewFile(int width, int height)
Parameters
OpenFile(File)
public bool OpenFile(File file)
Parameters
file
File
Returns
OpenFile(string)
public bool OpenFile(string filePath)
Parameters
filePath
string
Returns
OpenFileDialog()
public void OpenFileDialog()
ReloadFile()
public void ReloadFile()
SaveAsCurrentFile(string)
public void SaveAsCurrentFile(string filePath)
Parameters
filePath
string
SaveAsCurrentFileDialog()
public void SaveAsCurrentFileDialog()
SaveAsFile(File, string)
public void SaveAsFile(File file, string filePath)
Parameters
SaveAsFile(int, string)
public void SaveAsFile(int fileIndex, string filePath)
Parameters
SaveAsFileDialog(File)
public void SaveAsFileDialog(File file)
Parameters
file
File
SaveCurrentFileDialog()
public void SaveCurrentFileDialog()
SaveFileDialog(File)
public void SaveFileDialog(File file)
Parameters
file
File
SubscribeToFileSwitched(UnityAction)
public void SubscribeToFileSwitched(UnityAction call)
Parameters
call
UnityAction
SubscribeToFilesChanged(UnityAction)
public void SubscribeToFilesChanged(UnityAction call)
Parameters
call
UnityAction
SwitchToFile(int)
public void SwitchToFile(int fileIndex)
Parameters
fileIndex
int
TryCloseFile(File)
Will close the file if there are no unsaved changes. Otherwise it will open a dialog box asking if you want to save.
public bool TryCloseFile(File file)
Parameters
file
File
Returns
TryCloseFile(int)
Will close the file if there are no unsaved changes. Otherwise it will open a dialog box asking if you want to save.
public bool TryCloseFile(int fileIndex)
Parameters
fileIndex
int