Class TemplatesProvider
- Namespace
- Fallencake.UI
- Assembly
- Fallencake.UI.dll
ScriptableObject registry that stores references to available IDataTemplate assets.
[CreateAssetMenu(fileName = "TemplatesProvider", menuName = "Modular UI/Templates/Templates Provider", order = 0)]
public class TemplatesProvider : ScriptableObject, ITemplatesProvider
- Inheritance
-
objectObjectScriptableObjectTemplatesProvider
- Implements
Properties
Templates
Underlying list of template assets.
public List<ScriptableObject> Templates { get; }
Property Value
- List<ScriptableObject>
Methods
GetTemplate(string)
Finds a template by its TemplateName.
public IDataTemplate GetTemplate(string templateName)
Parameters
templateNamestringLogical template name to match.
Returns
- IDataTemplate
The matching template or null if not found.
GetTemplateByIndex(int)
Gets a template by list index when present and of expected type.
public IDataTemplate GetTemplateByIndex(int index)
Parameters
indexintIndex into Templates.
Returns
- IDataTemplate
The template at index or null if invalid or of different type.