Navigation
API > API/Plugins > API/Plugins/NiagaraEditor > API/Plugins/NiagaraEditor/ViewModels
Inheritance Hierarchy
- TNiagaraViewModelManager
- FNiagaraEmitterViewModel
- FNiagaraScriptToolkitParameterPanelViewModel
- FNiagaraScriptViewModel
- FNiagaraScratchPadScriptViewModel
- FNiagaraSystemToolkitParameterPanelViewModel
- FNiagaraSystemViewModel
- FNiagaraUserParameterPanelViewModel
References
| Module | NiagaraEditor |
| Header | /Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Public/ViewModels/TNiagaraViewModelManager.h |
| Include | #include "ViewModels/TNiagaraViewModelManager.h" |
Syntax
template<class ObjectType, class ViewModelType>
class TNiagaraViewModelManager
Remarks
A helper class to allow us to hook up Niagara view model types with the source models that they are currently observing. The assumption is that a ViewModel class will register and unregister the correct the model during its lifetime. Since it is possible that the ViewModel will hold onto the Model with a weak object pointer, we keep track of the registered pair using a separate data structure (aka Handle). You can only unregister with a valid handle. It is possible for a Model to be pointed to by multiple simultaneous ViewModels (like say event handler scripts). If this happens, you can query the additional ViewModels in the GetExistingViewModelForObject method.
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CleanAll () |
Called by a module manager to ensure that all known references have been cleared out before module shutdown. | |
| void | GetAllViewModels
(
TArray< TSharedRef< ViewModelType > >& OutViewModels |
||
| bool | GetAllViewModelsForObject
(
ObjectType* Object, |
||
| TSharedPtr< ViewModelType > | GetExistingViewModelForObject
(
ObjectType* Object, |
Query to determine if any ViewModel is currently pointing at this Model. | |
| Handle | RegisterViewModelWithMap
(
ObjectType* Model, |
Called to register a specific Model/ViewModel pair. | |
| void | UnregisterViewModelWithMap
(
Handle InHandle |
Called to forget about a specific Model/ViewModel pair. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| Handle |
Constants
| Name | Description |
|---|---|
| ObjectsToViewModels |