Class KnotResourceCollectionProvider
Loads KnotItemCollection from UnityEngine.Resources from relative Path
Inheritance
System.Object
KnotResourceCollectionProvider
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Knot.Localization.Data
Assembly: Knot.Localization.dll
Syntax
[Serializable]
[KnotTypeInfo("Resource", 0, "")]
public sealed class KnotResourceCollectionProvider : IKnotRuntimeItemCollectionProvider, IKnotPersistentItemCollectionProvider, IKnotItemCollectionProvider
Constructors
KnotResourceCollectionProvider()
Declaration
public KnotResourceCollectionProvider()
KnotResourceCollectionProvider(String, Boolean)
Declaration
public KnotResourceCollectionProvider(string path, bool asyncLoad = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
System.Boolean | asyncLoad |
Fields
AsyncLoad
Determines if asset should be loaded asynchronously via UnityEngine.Resources.UnityEngine.Resources.LoadAsync``1(System.String)
Declaration
[Tooltip("Determines if asset should be loaded asynchronously via Resources.LoadAsync")]
public bool AsyncLoad
Field Value
Type | Description |
---|---|
System.Boolean |
Path
Path to asset relative to UnityEngine.Resources folder e.g. TextCollections/KnoTextCollection_en
Declaration
[Tooltip("Path to asset relative to Resources folder e.g. \"TextCollections/KnotTextCollection\"")]
public string Path
Field Value
Type | Description |
---|---|
System.String |
Properties
Collection
Declaration
public KnotItemCollection Collection { get; }
Property Value
Type | Description |
---|---|
KnotItemCollection |
Methods
LoadAsync()
Declaration
public Task<KnotItemCollection> LoadAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<KnotItemCollection> |
Unload()
Declaration
public void Unload()