Class File<T>
Assembly: Glitch9.IO.dll
Syntax
[Serializable]
[JsonConverter(typeof(IFileJsonConverter))]
public sealed class File<T> : SerializableFile, ISerializable, IFile, IData, IHasId<string>, IHasName where T : Object
Type Parameters
Constructors
|
Edit this page
View Source
File()
Declaration
|
Edit this page
View Source
Declaration
public File(FileInfo info, string cloudUrl = null, T unityObject = null, SerializableMetadata metadata = null)
Parameters
|
Edit this page
View Source
Declaration
public File(string fullPath, string cloudUrl = null, T unityObject = null, SerializableMetadata metadata = null)
Parameters
Properties
|
Edit this page
View Source
ContentType
Declaration
public override MimeType ContentType { get; }
Property Value
Overrides
|
Edit this page
View Source
Exists
Declaration
public override bool Exists { get; }
Property Value
Overrides
|
Edit this page
View Source
FileType
Declaration
public override string FileType { get; }
Property Value
Overrides
|
Edit this page
View Source
HasData
Declaration
public override bool HasData { get; }
Property Value
Overrides
|
Edit this page
View Source
IsLoaded
Declaration
public override bool IsLoaded { get; }
Property Value
Overrides
|
Edit this page
View Source
UnityObject
Declaration
public T UnityObject { get; }
Property Value
Methods
|
Edit this page
View Source
CreateTempFileWithUnityObject(Object)
Declaration
public static File<T> CreateTempFileWithUnityObject(Object unityObject)
Parameters
| Type |
Name |
Description |
| Object |
unityObject |
|
Returns
|
Edit this page
View Source
EnsureAssetLoaded(Action<bool>)
Declaration
public override void EnsureAssetLoaded(Action<bool> onResult = null)
Parameters
Overrides
|
Edit this page
View Source
EnsureAssetLoadedAsync(Action<bool>)
Declaration
public override UniTask EnsureAssetLoadedAsync(Action<bool> onResult = null)
Parameters
Returns
Overrides
|
Edit this page
View Source
FromUnityObject(Object, string)
Declaration
public static File<T> FromUnityObject(Object unityObject, string fullPath)
Parameters
| Type |
Name |
Description |
| Object |
unityObject |
|
| string |
fullPath |
|
Returns
|
Edit this page
View Source
LoadAsync(bool, Action<T>)
Declaration
public UniTask<T> LoadAsync(bool forceReload = false, Action<T> onResult = null)
Parameters
| Type |
Name |
Description |
| bool |
forceReload |
|
| Action<T> |
onResult |
|
Returns
| Type |
Description |
| UniTask<T> |
|
|
Edit this page
View Source
ReadAllBytes()
Declaration
public override byte[] ReadAllBytes()
Returns
Overrides
|
Edit this page
View Source
ReadAllBytesAsync()
Declaration
public override UniTask<byte[]> ReadAllBytesAsync()
Returns
| Type |
Description |
| UniTask<byte[]> |
|
Overrides
|
Edit this page
View Source
ReloadAsset(Action<bool>)
Declaration
public override void ReloadAsset(Action<bool> onResult = null)
Parameters
Overrides
|
Edit this page
View Source
Relocate(string, Action<T>)
Declaration
public void Relocate(string fullPath, Action<T> onResult = null)
Parameters
|
Edit this page
View Source
Relocate(string, T)
Declaration
public void Relocate(string fullPath, T asset = null)
Parameters
| Type |
Name |
Description |
| string |
fullPath |
|
| T |
asset |
|
|
Edit this page
View Source
SetUnityObject(T)
Used internally for UnityEditor usage
Declaration
public void SetUnityObject(T asset)
Parameters
| Type |
Name |
Description |
| T |
asset |
|
|
Edit this page
View Source
WriteFileAsync()
Declaration
public UniTask WriteFileAsync()
Returns
Operators
|
Edit this page
View Source
implicit operator T(File<T>)
Declaration
public static implicit operator T(File<T> file)
Parameters
| Type |
Name |
Description |
| File<T> |
file |
|
Returns
Implements
Extension Methods