HaikaraUI Attribute
[HaikaraUI] is an attribute required to recognize a class as being associated with a .uxml (or .uss) file.
The SourceGenerator first collects classes that have this attribute.
Parameters
| Parameter | Type | Required | Default Value |
|---|---|---|---|
| ReferenceMode | AssetReferenceMode | no | AssetReferenceMode.Resource |
- ReferenceMode
ReferenceModedetermines where to load the UI asset (VisualTreeAssetorStyleSheet) from.- Resource
IfResourceis specified, the actual UI asset will be registered in theUICatalogand instantiated at load time. - AssetPath (Editor Only)
IfAssetPathis specified, the asset path will be registered in theUICatalog.
The asset will be loaded from the path usingUnityEditor.AssetDatabase.LoadAssetAtPath<T>(). - Custom
UI loading will be performed using a user-definedUILoader.
IfCustomis specified, you must register the definedUILoaderwith theUICatalog.
Reference:AddressablesUILoader
- Resource