Class ResourceList | MARS Companion Core | 0.1.9-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class ResourceList

    Inheritance
    Object
    ResourceList
    Namespace: Unity.MARS.Companion.Core
    Syntax
    [Serializable]
    public class ResourceList : ISerializationCallbackReceiver, IFormatVersion

    Properties

    Merged

    Declaration
    public bool Merged { get; }
    Property Value
    Type Description
    Boolean

    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
    Type Name Description
    String key
    String platform
    String bundleKey
    Int64 fileSize

    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

    CheckFormatVersion()

    Declaration
    public void CheckFormatVersion()
    Implements
    Unity.RuntimeSceneSerialization.IFormatVersion.CheckFormatVersion()

    GetBundleGroupSize(String, Boolean)

    Declaration
    public long GetBundleGroupSize(string key, bool useCloudVersion = false)
    Parameters
    Type Name Description
    String key
    Boolean useCloudVersion
    Returns
    Type Description
    Int64

    GetListAsString()

    Declaration
    public string GetListAsString()
    Returns
    Type Description
    String

    GetSortedList()

    Declaration
    public List<CompanionResource> GetSortedList()
    Returns
    Type Description
    List<CompanionResource>

    HasAssetBundle(String, String)

    Declaration
    public bool HasAssetBundle(string key, string platform)
    Parameters
    Type Name Description
    String key
    String platform
    Returns
    Type Description
    Boolean

    MergeResourceLists(ResourceList, ResourceList)

    Declaration
    public static ResourceList MergeResourceLists(ResourceList local, ResourceList remote)
    Parameters
    Type Name Description
    ResourceList local
    ResourceList remote
    Returns
    Type Description
    ResourceList

    OnAfterDeserialize()

    Declaration
    public void OnAfterDeserialize()
    Implements
    ISerializationCallbackReceiver.OnAfterDeserialize()

    OnBeforeSerialize()

    Declaration
    public void OnBeforeSerialize()
    Implements
    ISerializationCallbackReceiver.OnBeforeSerialize()

    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
    Type Name Description
    List<CompanionResource> resources

    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
    Type Name Description
    String key
    String platform
    String bundleKey
    Returns
    Type Description
    Boolean

    TryGetBundleGroup(String, out AssetBundleGroup)

    Declaration
    public bool TryGetBundleGroup(string key, out AssetBundleGroup resource)
    Parameters
    Type Name Description
    String key
    AssetBundleGroup resource
    Returns
    Type Description
    Boolean

    TryGetResource(String, out CompanionResource)

    Declaration
    public bool TryGetResource(string key, out CompanionResource resource)
    Parameters
    Type Name Description
    String key
    CompanionResource resource
    Returns
    Type Description
    Boolean
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023