Class UniFileBase<T>
[Serializable]
public abstract class UniFileBase<T> : IUniFile
Type Parameters
T
- Inheritance
-
UniFileBase<T>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
UniFileBase(UniFileType)
protected UniFileBase(UniFileType fileType)
Parameters
fileTypeUniFileType
UniFileBase(UniFileType, string, string)
protected UniFileBase(UniFileType fileType, string filePath, string url = null)
Parameters
fileTypeUniFileTypefilePathstringurlstring
UniFileBase(UniFileType, T)
protected UniFileBase(UniFileType fileType, T value)
Parameters
fileTypeUniFileTypevalueT
UniFileBase(UniFileType, T, string, string)
protected UniFileBase(UniFileType fileType, T value, string filePath, string url = null)
Parameters
fileTypeUniFileTypevalueTfilePathstringurlstring
Properties
FileType
public UniFileType FileType { get; set; }
Property Value
IsError
public bool IsError { get; }
Property Value
IsLoaded
public bool IsLoaded { get; }
Property Value
IsLoading
public bool IsLoading { get; }
Property Value
IsValid
public bool IsValid { get; }
Property Value
LastError
public string LastError { get; }
Property Value
MimeType
public MIMEType MimeType { get; set; }
Property Value
Name
public string Name { get; }
Property Value
Path
Returns the absolute path of the file if it's a local file. Returns the URL if it's a web file.
public string Path { get; set; }
Property Value
Url
public string Url { get; set; }
Property Value
Value
public T Value { get; set; }
Property Value
- T
Methods
EncodeToBase64()
public string EncodeToBase64()
Returns
LoadAsync(bool, Action<T>)
public UniTask<T> LoadAsync(bool forceReload = false, Action<T> onLoaded = null)
Parameters
Returns
- UniTask<T>
LoadFileAsync()
protected abstract UniTask<T> LoadFileAsync()
Returns
- UniTask<T>
ToBinaryData()
public abstract byte[] ToBinaryData()
Returns
- byte[]