Integrating up through commit 90f050496

This commit is contained in:
alexpete
2021-04-07 14:03:29 -07:00
parent 8f2ed080a9
commit c2cbd430fe
2694 changed files with 285622 additions and 176874 deletions
+27 -4
View File
@@ -40,14 +40,10 @@ namespace Camera
void CameraComponent::Activate()
{
CameraComponentBase::Activate();
m_controller.ActivateAtomView();
}
void CameraComponent::Deactivate()
{
m_controller.DeactivateAtomView();
CameraComponentBase::Deactivate();
}
@@ -62,6 +58,28 @@ namespace Camera
return true;
}
class CameraNotificationBus_BehaviorHandler : public CameraNotificationBus::Handler, public AZ::BehaviorEBusHandler
{
public:
AZ_EBUS_BEHAVIOR_BINDER(CameraNotificationBus_BehaviorHandler, "{91E442A0-37E7-4E03-AB59-FEC11A06741D}", AZ::SystemAllocator,
OnCameraAdded, OnCameraRemoved, OnActiveViewChanged);
void OnCameraAdded(const AZ::EntityId& cameraId) override
{
Call(FN_OnCameraAdded, cameraId);
}
void OnCameraRemoved(const AZ::EntityId& cameraId) override
{
Call(FN_OnCameraRemoved, cameraId);
}
void OnActiveViewChanged(const AZ::EntityId& cameraId) override
{
Call(FN_OnCameraRemoved, cameraId);
};
};
void CameraComponent::Reflect(AZ::ReflectContext* reflection)
{
CameraComponentBase::Reflect(reflection);
@@ -101,6 +119,11 @@ namespace Camera
->Attribute(AZ::Script::Attributes::Category, "Camera")
->Event("GetActiveCamera", &CameraSystemRequestBus::Events::GetActiveCamera)
;
behaviorContext->EBus<CameraNotificationBus>("CameraNotificationBus")
->Attribute(AZ::Script::Attributes::Category, "Camera")
->Handler<CameraNotificationBus_BehaviorHandler>()
;
}
}
} //namespace Camera