Provides functionality for navigating through frames, accessing properties of frames, and interacting with modules. It also handles the initialization and destruction of the viewer.
More...
Inherits MonoBehaviour.
|
void | Close () |
| Closes the viewer.
|
|
void | Destroy () |
| Destroys the viewer.
|
|
IEnumerable< Property > | GetAvailableProperties (bool updateModules=true) |
| Retrieves all available properties from the modules.
|
|
void | Initialize (Loader loader) |
| Initializes the viewer with the specified loader.
|
|
void | NextFrame () |
| Switches to the next frame in the gallery. If the current frame is the last one and the gallery is set to loop, it will switch back to the first frame. If the gallery is not set to loop, it will stay on the last frame.
|
|
void | PreviousFrame () |
| Switches to the previous frame in the gallery. If the current frame is the first one and the gallery is set to loop, it will switch to the last frame. If the gallery is not set to loop, it will stay on the first frame.
|
|
void | ReloadModules () |
| Causes modules to reload, e.g. the list or contents of frames have been changed.
|
|
void | SetFrame (int index) |
| Sets the frame at the specified index.
|
|
|
static Viewer | Show (Loader loader) |
| Shows the viewer with the specified loader.
|
|
static Viewer | Show (GameObject prefab, RectTransform container, Frames frames, int frameIndex=0) |
| Shows the viewer with the specified frames.
|
|
|
const string | Version = "1.0.0.1" |
| The version of the Smart Gallery.
|
|
|
Frame | currentFrame [get] |
| Gets the current frame.
|
|
int | currentFrameIndex [get] |
| Gets the index of the current frame.
|
|
Frames | frames [get] |
| Gets all frames.
|
|
InteractionLocker | interactionLocker [get] |
| Gets the interaction locker.
|
|
bool | hasNextFrame [get] |
| Gets a value indicating whether there is a next frame.
|
|
bool | hasPreviousFrame [get] |
| Gets a value indicating whether there is a previous frame.
|
|
MessageSystem | messageSystem [get] |
| Gets the message system.
|
|
int | totalFrames [get] |
| Gets the total number of frames.
|
|
|
static Action< Viewer > | ViewerInitialized |
| Occurs when any Viewer is initialized.
|
|
Action | Initialized |
| Occurs when the Viewer is initialized.
|
|
Provides functionality for navigating through frames, accessing properties of frames, and interacting with modules. It also handles the initialization and destruction of the viewer.
◆ GetAvailableProperties()
IEnumerable< Property > GetAvailableProperties |
( |
bool | updateModules = true | ) |
|
Retrieves all available properties from the modules.
- Parameters
-
updateModules | Indicates whether to update the modules. |
- Returns
- An IEnumerable of Property objects, representing the available properties from the modules. The properties are ordered by their weight and duplicates are removed.
◆ Initialize()
void Initialize |
( |
Loader | loader | ) |
|
Initializes the viewer with the specified loader.
- Parameters
-
◆ SetFrame()
void SetFrame |
( |
int | index | ) |
|
Sets the frame at the specified index.
- Parameters
-
index | The index of the frame. |
◆ Show() [1/2]
static Viewer Show |
( |
GameObject | prefab, |
|
|
RectTransform | container, |
|
|
Frames | frames, |
|
|
int | frameIndex = 0 ) |
|
static |
Shows the viewer with the specified frames.
- Parameters
-
prefab | The viewer prefab. |
container | The container. |
frames | The frames. |
frameIndex | The index of the frame. |
- Returns
◆ Show() [2/2]
Shows the viewer with the specified loader.
- Parameters
-
- Returns
- The viewer.