#include <EditorComponentBase.h>
Inherits AZ::Component.
Inherited by AzToolsFramework::Components::EditorComponentAdapter< TController, TRuntimeComponent, TConfiguration >, AzToolsFramework::Components::EditorDisabledCompositionComponent, AzToolsFramework::Components::EditorEntityIconComponent, AzToolsFramework::Components::EditorEntitySortComponent, AzToolsFramework::Components::EditorInspectorComponent, AzToolsFramework::Components::EditorLockComponent, AzToolsFramework::Components::EditorNonUniformScaleComponent, AzToolsFramework::Components::EditorOnlyEntityComponent, AzToolsFramework::Components::EditorPendingCompositionComponent, AzToolsFramework::Components::EditorVisibilityComponent, AzToolsFramework::Components::GenericComponentWrapper, AzToolsFramework::Components::ScriptEditorComponent, AzToolsFramework::Components::SelectionComponent, AzToolsFramework::Components::TransformComponent, AzToolsFramework::LocalViewBookmarkComponent, AzToolsFramework::Prefab::EditorPrefabComponent, and AzToolsFramework::SharedViewBookmarkComponent.
|
| static void | Reflect (AZ::ReflectContext *context) |
| |
|
|
class | EditorEntityActionComponent |
| |
|
class | EditorDisabledCompositionComponent |
| |
|
class | EditorPendingCompositionComponent |
| |
A base class for all editor components. Derive from this class to create a version of a component to use in the editor, as opposed to the version of the component that is used during runtime.
Important: Game components must not inherit from EditorComponentBase. To create one or more game components to represent your editor component in runtime, use BuildGameEntity().
To learn more about editor components, see the Editor Components documentation.
◆ EditorComponentBase()
| AzToolsFramework::Components::EditorComponentBase::EditorComponentBase |
( |
| ) |
|
Creates an instance of this class.
◆ Activate()
| virtual void AzToolsFramework::Components::EditorComponentBase::Activate |
( |
| ) |
|
|
overridevirtual |
◆ AddContextMenuActions()
| virtual void AzToolsFramework::Components::EditorComponentBase::AddContextMenuActions |
( |
QMenu * |
| ) |
|
|
inlinevirtual |
Implement this to add component specific context menu options to your editor component when right clicked in the entity inspector
◆ AZ_RTTI()
| AzToolsFramework::Components::EditorComponentBase::AZ_RTTI |
( |
EditorComponentBase |
, |
|
|
"{D5346BD4-7F20-444E-B370-327ACD03D4A0}" |
, |
|
|
AZ::Component |
|
|
) |
| |
Adds run-time type information to the component.
◆ BuildGameEntity()
| virtual void AzToolsFramework::Components::EditorComponentBase::BuildGameEntity |
( |
AZ::Entity * |
| ) |
|
|
inlinevirtual |
◆ Deactivate()
| virtual void AzToolsFramework::Components::EditorComponentBase::Deactivate |
( |
| ) |
|
|
overridevirtual |
◆ GetLocalTM()
| AZ::Transform AzToolsFramework::Components::EditorComponentBase::GetLocalTM |
( |
| ) |
const |
Gets the local transform of the entity that the component belongs to, if the entity has a transform component. An entity's local transform is the entity's position relative to its parent entity.
- Returns
- The local transform, if the entity has one. Otherwise, returns the identity transform, which is the equivalent of no transform.
◆ GetSerializedIdentifier()
| AZStd::string AzToolsFramework::Components::EditorComponentBase::GetSerializedIdentifier |
( |
| ) |
const |
|
finaloverride |
Gets the serialzied identifier of this component within an entity.
- Returns
- The serialized identifier of this component.
◆ GetTransform()
| AZ::TransformInterface * AzToolsFramework::Components::EditorComponentBase::GetTransform |
( |
| ) |
const |
Gets the transform interface of the entity that the component belongs to, if the entity has a transform component. A transform positions, rotates, and scales an entity in 3D space.
- Returns
- A pointer to the transform interface. Might be null if you did not include "TransformService" in the component's AZ::ComponentDescriptor::GetRequiredServices().
◆ GetWorldTM()
| AZ::Transform AzToolsFramework::Components::EditorComponentBase::GetWorldTM |
( |
| ) |
const |
Gets the world transform of the entity that the component belongs to, if the entity has a transform component. An entity's world transform is the entity's position within the entire game space.
- Returns
- The world transform, if the entity has one. Otherwise, returns the identity transform, which is the equivalent of no transform.
◆ Init()
| virtual void AzToolsFramework::Components::EditorComponentBase::Init |
( |
| ) |
|
|
overridevirtual |
◆ InvalidatePropertyDisplay()
| void AzToolsFramework::Components::EditorComponentBase::InvalidatePropertyDisplay |
( |
AzToolsFramework::PropertyModificationRefreshLevel |
refreshFlags | ) |
|
Invoke this to refresh the property display for the component. Only refreshes the ui for this component, not adjacent ones, which is faster than asking for complete full tree refresh of every entity in every inspector on every component. See AzToolsFramework::RefreshType for the different types of refreshes. Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h
- Parameters
-
| refreshFlags | The type of refresh to perform. (Most common is either Refresh_EntireTree or Refresh_Values). |
◆ IsSelected()
| bool AzToolsFramework::Components::EditorComponentBase::IsSelected |
( |
| ) |
const |
Identifies whether the component is selected in the editor.
- Returns
- True if the component is selected in the editor. Otherwise, false.
◆ OnAfterEntitySet()
| void AzToolsFramework::Components::EditorComponentBase::OnAfterEntitySet |
( |
| ) |
|
|
finaloverride |
Function to call after setting the entity in this component. For an editor component, this would set up the serialized identifier.
◆ Reflect()
| static void AzToolsFramework::Components::EditorComponentBase::Reflect |
( |
AZ::ReflectContext * |
context | ) |
|
|
static |
Reflects component data into a variety of contexts (script, serialize, edit, and so on).
- Parameters
-
| context | A pointer to the reflection context. |
◆ SetDirty()
| void AzToolsFramework::Components::EditorComponentBase::SetDirty |
( |
| ) |
|
Sets a flag on the entire entity to indicate that the entity's properties were modified. Call this function whenever you alter an entity in an unexpected manner. For example, edits that you make to one entity might affect other entities, so the affected entities need to know that something changed. You do not need to call this function when editing an entity's property in the Property Editor, because that scenario automatically sets the flag. You need to call this function only when your entity's properties are modified outside the Property Editor, such as when a script loops over all lights and alters their radii.
◆ SetPrimaryAsset()
| virtual void AzToolsFramework::Components::EditorComponentBase::SetPrimaryAsset |
( |
const AZ::Data::AssetId & |
| ) |
|
|
inlinevirtual |
◆ SetSerializedIdentifier()
| void AzToolsFramework::Components::EditorComponentBase::SetSerializedIdentifier |
( |
AZStd::string |
serializedIdentifier | ) |
|
|
finaloverride |
Sets the provided string as the serialized identifier for the component.
- Parameters
-
| serializedIdentifer | The unique identifier for this component within the entity it lives in. |
The documentation for this class was generated from the following file: