#include <GenericComponentWrapper.h>
Inherits AzToolsFramework::Components::EditorComponentBase, and AzFramework::EntityDebugDisplayEventBus::Handler.
Public Member Functions | |
AZ_CLASS_ALLOCATOR (GenericComponentWrapper, AZ::SystemAllocator) | |
AZ_RTTI (GenericComponentWrapper, "{68D358CA-89B9-4730-8BA6-E181DEA28FDE}", EditorComponentBase) | |
GenericComponentWrapper (const AZ::SerializeContext::ClassData *templateClassData) | |
GenericComponentWrapper (AZ::Component *templateClass) | |
GenericComponentWrapper (const GenericComponentWrapper &RHS) | |
GenericComponentWrapper (GenericComponentWrapper &&RHS) | |
GenericComponentWrapper & | operator= (const GenericComponentWrapper &RHS) |
GenericComponentWrapper & | operator= (GenericComponentWrapper &&RHS) |
const char * | GetDisplayName () |
const char * | GetDisplayDescription () |
void | Init () override |
void | Activate () override |
void | Deactivate () override |
AZ::TypeId | GetUnderlyingComponentType () const override |
void | DisplayEntityViewport (const AzFramework::ViewportInfo &viewportInfo, AzFramework::DebugDisplayRequests &debugDisplay) override |
void | BuildGameEntity (AZ::Entity *gameEntity) override |
void | SetPrimaryAsset (const AZ::Data::AssetId &assetId) override |
AZ::ComponentValidationResult | ValidateComponentRequirements (const AZ::ImmutableEntityVector &sliceEntities, const AZStd::unordered_set< AZ::Crc32 > &platformTags) const override |
AZ::Component * | GetTemplate () const |
AZ::Component * | ReleaseTemplate () |
Forget about, and release ownership of, template component. | |
Public Member Functions inherited from AzToolsFramework::Components::EditorComponentBase | |
AZ_RTTI (EditorComponentBase, "{D5346BD4-7F20-444E-B370-327ACD03D4A0}", AZ::Component) | |
EditorComponentBase () | |
void | SetDirty () |
virtual void | Init () override |
virtual void | Activate () override |
virtual void | Deactivate () override |
void | OnAfterEntitySet () override final |
void | SetSerializedIdentifier (AZStd::string serializedIdentifier) override final |
AZStd::string | GetSerializedIdentifier () const override final |
AZ::TransformInterface * | GetTransform () const |
AZ::Transform | GetWorldTM () const |
AZ::Transform | GetLocalTM () const |
bool | IsSelected () const |
virtual void | BuildGameEntity (AZ::Entity *) |
virtual void | SetPrimaryAsset (const AZ::Data::AssetId &) |
virtual void | AddContextMenuActions (QMenu *) |
Static Public Member Functions | |
static AZ::ComponentDescriptor * | CreateDescriptor () |
static void | Reflect (AZ::ReflectContext *context) |
Static Public Member Functions inherited from AzToolsFramework::Components::EditorComponentBase | |
static void | Reflect (AZ::ReflectContext *context) |
Protected Attributes | |
AZ::Component * | m_template = nullptr |
AzFramework::EditorEntityEvents * | m_templateEvents = nullptr |
AZStd::string | m_displayName |
AZStd::string | m_displayDescription |
GenericComponentWrapper wraps around a component in the editor. It is used to add components without a specialized editor component to an entity.
|
overridevirtual |
Gets the transform component and selection component of the entity that the component belongs to, if the entity has them. Overrides AZ::Component::Activate().
Important: Components derived from EditorComponentBase must call the Activate() function of the base class.
Reimplemented from AzToolsFramework::Components::EditorComponentBase.
|
overridevirtual |
Override this function to create one or more game components to represent your editor component in runtime.
Important: If your entity has a game component, you must implement this function.
This function is called by the slice builder. Any game components that you create should be attached to the game entity that is provided to this function. If you do not need to create a game component, you do not need to override this function. The provided component to the gameEntity is dynamically generated and owned by the gameEntity and should be deallocated appropriately.
gameEntity | A pointer to the game entity. |
Reimplemented from AzToolsFramework::Components::EditorComponentBase.
|
overridevirtual |
Sets the component's pointers to the transform component and selection component to null. Overrides AZ::Component::Deactivate().
Important: Components derived from EditorComponentBase must call the Deactivate() function of the base class.
Reimplemented from AzToolsFramework::Components::EditorComponentBase.
|
overridevirtual |
Initializes the component's resources. Overrides AZ::Component::Init().
Important: Components derived from EditorComponentBase must call the Init() function of the base class.
(Optional) You can override this function to initialize resources that the component needs.
Reimplemented from AzToolsFramework::Components::EditorComponentBase.
|
overridevirtual |
Implement this function to support dragging and dropping an asset onto this component.
assetId | A reference to the ID of the asset to drag and drop. |
Reimplemented from AzToolsFramework::Components::EditorComponentBase.