Attribute that enables editing properties of a referenced object.
More...
|
bool | AlwaysExpanded [get] |
| Whether the attribute is always expanded. More...
|
|
bool | ShowNewButton [get] |
| Whether to show a "New" button to create new instances. More...
|
|
string | SavePath [get] |
| The default path to save newly created ScriptableObjects at. More...
|
|
bool | ShowChildTypes [get] |
| Whether to show a dropdown of all types extending the type of the variable. More...
|
|
IReadOnlyList< Type > | RequiredInterfaces [get] |
| Interfaces that must be implemented by assigned objects. More...
|
|
bool | OnlyShowMainLine [get, set] |
| If true, don't show the child properties even if the property is expanded. You can use this to implement your own inspector logic for the child properties. More...
|
|
Attribute that enables editing properties of a referenced object.
Normally, to edit a referenced object, you'd have to change the inspector context. With an ExpandableAttribute, you can just expand the property and edit the referenced object inline. If the type of the reference field is a ScriptableObject, the ExpandableAttribute also allows creating new instances in the inspector.
◆ ExpandableAttribute()
Infohazard.Core.ExpandableAttribute.ExpandableAttribute |
( |
bool |
alwaysExpanded = false , |
|
|
string |
savePath = null , |
|
|
bool |
showNewButton = true , |
|
|
bool |
showChildTypes = false , |
|
|
params Type[] |
requiredInterfaces |
|
) |
| |
Construct a new ExpandableAttribute.
- Parameters
-
alwaysExpanded | Whether the attribute is always expanded. |
savePath | Whether to show a "New" button to create new instances. |
showNewButton | The default path to save newly created ScriptableObjects at. |
showChildTypes | Whether to show a dropdown of all types extending the type of the variable. |
requiredInterfaces | Interfaces that must be implemented by assigned objects. |
◆ AlwaysExpanded
bool Infohazard.Core.ExpandableAttribute.AlwaysExpanded |
|
get |
Whether the attribute is always expanded.
If false, will show the expander.
◆ OnlyShowMainLine
bool Infohazard.Core.ExpandableAttribute.OnlyShowMainLine |
|
getset |
If true, don't show the child properties even if the property is expanded. You can use this to implement your own inspector logic for the child properties.
◆ RequiredInterfaces
IReadOnlyList<Type> Infohazard.Core.ExpandableAttribute.RequiredInterfaces |
|
get |
Interfaces that must be implemented by assigned objects.
◆ SavePath
string Infohazard.Core.ExpandableAttribute.SavePath |
|
get |
The default path to save newly created ScriptableObjects at.
If unset, this will use the same path as the containing object if it is an asset.
◆ ShowChildTypes
bool Infohazard.Core.ExpandableAttribute.ShowChildTypes |
|
get |
Whether to show a dropdown of all types extending the type of the variable.
◆ ShowNewButton
bool Infohazard.Core.ExpandableAttribute.ShowNewButton |
|
get |
Whether to show a "New" button to create new instances.
This only works if the type of the field is a ScriptableObject.
The documentation for this class was generated from the following file:
- Runtime/Attributes/ExpandableAttribute.cs