Class PanelChangedEventBase<T>
Abstract base class for events notifying of a panel change.
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public abstract class PanelChangedEventBase<T> : EventBase<T>, IPanelChangedEvent where T : PanelChangedEventBase<T>, new()
Type Parameters
Name | Description |
---|---|
T |
Constructors
PanelChangedEventBase()
Declaration
protected PanelChangedEventBase()
Properties
destinationPanel
In the case of AttachToPanelEvent, the panel to which the event target element is now attached. In the case of DetachFromPanelEvent, the panel to which the event target element will be attached.
Declaration
public IPanel destinationPanel { get; }
Property Value
Type | Description |
---|---|
IPanel |
originPanel
In the case of AttachToPanelEvent, the panel to which the event target element was attached. In the case of DetachFromPanelEvent, the panel from which the event target element is detached.
Declaration
public IPanel originPanel { get; }
Property Value
Type | Description |
---|---|
IPanel |
Methods
GetPooled(IPanel, IPanel)
Gets an event from the event pool and initializes it with the given values. Use this function instead of creating new events. Events obtained using this method need to be released back to the pool. You can use Dispose()
to release them.
Declaration
public static T GetPooled(IPanel originPanel, IPanel destinationPanel)
Parameters
Type | Name | Description |
---|---|---|
IPanel | originPanel | Sets the originPanel property of the event. |
IPanel | destinationPanel | Sets the destinationPanel property of the event. |
Returns
Type | Description |
---|---|
T | An initialized event. |
Init()
Resets the event members to their initial values.
Declaration
protected override void Init()