Table of Contents

Class FileManager

Namespace
PAC.Files
public class FileManager : MonoBehaviour
Inheritance
FileManager

Fields

defaultFileName

public const string defaultFileName = "Untitled Image"

Field Value

string

previousFile

public File previousFile

Field Value

File

Properties

currentFile

public File currentFile { get; }

Property Value

File

currentFileIndex

public int currentFileIndex { get; }

Property Value

int

files

public List<File> files { get; }

Property Value

List<File>

Methods

AddFile(File)

public bool AddFile(File file)

Parameters

file File

Returns

bool

CloseFile(File)

Closes the file, with no checks for unsaved changes.

public bool CloseFile(File file)

Parameters

file File

Returns

bool

CloseFile(int)

Closes the file, with no checks for unsaved changes.

public File CloseFile(int fileIndex)

Parameters

fileIndex int

Returns

File

ExportAnimation(int, string)

public bool ExportAnimation(int fileIndex, string filePath)

Parameters

fileIndex int
filePath string

Returns

bool

ExportCurrentAnimation(string)

public bool ExportCurrentAnimation(string filePath)

Parameters

filePath string

Returns

bool

ExportCurrentAnimationDialog()

public void ExportCurrentAnimationDialog()

ExportCurrentFrame(int, string)

public bool ExportCurrentFrame(int frameIndex, string filePath)

Parameters

frameIndex int
filePath string

Returns

bool

ExportCurrentFrameDialog()

public void ExportCurrentFrameDialog()

ExportFrame(int, int, string)

public bool ExportFrame(int frameIndex, int fileIndex, string filePath)

Parameters

frameIndex int
fileIndex int
filePath string

Returns

bool

ImportDialog()

public void ImportDialog()

NewFile(int, int)

public void NewFile(int width, int height)

Parameters

width int
height int

OpenFile(File)

public bool OpenFile(File file)

Parameters

file File

Returns

bool

OpenFile(string)

public bool OpenFile(string filePath)

Parameters

filePath string

Returns

bool

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

file File
filePath string

SaveAsFile(int, string)

public void SaveAsFile(int fileIndex, string filePath)

Parameters

fileIndex int
filePath string

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

bool

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

Returns

bool