Class ResourceList
Syntax
[Serializable]
public class ResourceList : ISerializationCallbackReceiver, IFormatVersion
Properties
Merged
Declaration
public bool Merged { get; }
Property Value
Methods
AddOrOverwriteExistingResource(CompanionResource)
Add or overwrite an existing resource. The timestamp in the provided resource will be preserved
Declaration
public void AddOrOverwriteExistingResource(CompanionResource resource)
Parameters
Type |
Name |
Description |
CompanionResource |
resource |
The resource to add or write to the list
|
AddOrUpdateBundle(String, String, String, Int64)
Declaration
public void AddOrUpdateBundle(string key, string platform, string bundleKey, long fileSize)
Parameters
AddOrUpdateNewResource(String, String, ResourceType, Int64, Boolean)
Add a new or updated resource the list. The current time will be applied as a timestamp
Declaration
public CompanionResource AddOrUpdateNewResource(string key, string name, ResourceType type, long fileSize, bool hasBundle)
Parameters
Type |
Name |
Description |
String |
key |
The storage key of the new resource
|
String |
name |
The name of the new resource
|
ResourceType |
type |
The type of the new resource
|
Int64 |
fileSize |
The file size of the new resource
|
Boolean |
hasBundle |
Whether this resource has an associated AssetBundle
|
Returns
Type |
Description |
CompanionResource |
The ResourceListViewData that was created or updated
|
Declaration
public void CheckFormatVersion()
Implements
Unity.RuntimeSceneSerialization.IFormatVersion.CheckFormatVersion()
GetBundleGroupSize(String, Boolean)
Declaration
public long GetBundleGroupSize(string key, bool useCloudVersion = false)
Parameters
Returns
GetListAsString()
Declaration
public string GetListAsString()
Returns
GetSortedList()
Declaration
public List<CompanionResource> GetSortedList()
Returns
HasAssetBundle(String, String)
Declaration
public bool HasAssetBundle(string key, string platform)
Parameters
Returns
MergeResourceLists(ResourceList, ResourceList)
Declaration
public static ResourceList MergeResourceLists(ResourceList local, ResourceList remote)
Parameters
Returns
OnAfterDeserialize()
Declaration
public void OnAfterDeserialize()
Implements
OnBeforeSerialize()
Declaration
public void OnBeforeSerialize()
Implements
RemoveResource(String)
Declaration
public void RemoveResource(string index)
Parameters
Type |
Name |
Description |
String |
index |
|
RemoveResources(List<CompanionResource>)
Declaration
public void RemoveResources(List<CompanionResource> resources)
Parameters
SetCloudResource(Boolean)
Declaration
public void SetCloudResource(bool isCloudResourceList)
Parameters
Type |
Name |
Description |
Boolean |
isCloudResourceList |
|
TryGetAssetBundleKey(String, String, out String)
Declaration
public bool TryGetAssetBundleKey(string key, string platform, out string bundleKey)
Parameters
Returns
TryGetBundleGroup(String, out AssetBundleGroup)
Declaration
public bool TryGetBundleGroup(string key, out AssetBundleGroup resource)
Parameters
Returns
TryGetResource(String, out CompanionResource)
Declaration
public bool TryGetResource(string key, out CompanionResource resource)
Parameters
Returns