Class ExpandedStateList<TTarget>
Used in editor drawer part to store the state of expandable areas using EditorPrefBoolFlags for a list of elements.
Inherited Members
Namespace: UnityEditor.Rendering
Assembly: Unity.RenderPipelines.Core.Editor.dll
Syntax
public class ExpandedStateList<TTarget> : ExpandedState<int, TTarget>
Type Parameters
Name | Description |
---|---|
TTarget | A type given to automatically compute the key. |
Constructors
ExpandedStateList(string)
Constructor will create the key to store in the EditorPref the state given generic type passed. The key will be formated as such prefix:TTarget:TState:UI_State.
Declaration
public ExpandedStateList(string prefix = "CoreRP")
Parameters
Type | Name | Description |
---|---|---|
string | prefix | [Optional] Prefix scope of the key (Default is CoreRP) |
Methods
RemoveFlagAtIndex(int)
Removes a flag at a given index which causes the following flags' index to decrease by one.
Declaration
public void RemoveFlagAtIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the flag to be removed. |
SwapFlags(int, int)
Swap flag between src index and dst index.
Declaration
public void SwapFlags(int srcIndex, int dstIndex)
Parameters
Type | Name | Description |
---|---|---|
int | srcIndex | src index to swap. |
int | dstIndex | dst index to swap. |