LyShineSystemComponent.cpp 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AzCore/Serialization/SerializeContext.h>
  9. #include <AzCore/Serialization/EditContext.h>
  10. #include <AzCore/Component/ComponentApplicationBus.h>
  11. #include <AzCore/RTTI/BehaviorContext.h>
  12. #include "LyShineFeatureProcessor.h"
  13. #include "LyShineSystemComponent.h"
  14. #include "UiSerialize.h"
  15. #include "UiCanvasFileObject.h"
  16. #include "UiCanvasComponent.h"
  17. #include "LyShineDebug.h"
  18. #include "UiElementComponent.h"
  19. #include "UiHierarchyInteractivityToggleComponent.h"
  20. #include "UiTransform2dComponent.h"
  21. #include "UiImageComponent.h"
  22. #include "UiImageSequenceComponent.h"
  23. #include "UiTextComponent.h"
  24. #include "UiButtonComponent.h"
  25. #include "UiMarkupButtonComponent.h"
  26. #include "UiCheckboxComponent.h"
  27. #include "UiDraggableComponent.h"
  28. #include "UiDropTargetComponent.h"
  29. #include "UiDropdownComponent.h"
  30. #include "UiDropdownOptionComponent.h"
  31. #include "UiSliderComponent.h"
  32. #include "UiTextInputComponent.h"
  33. #include "UiScrollBarComponent.h"
  34. #include "UiScrollBoxComponent.h"
  35. #include "UiFaderComponent.h"
  36. #include "UiLayoutFitterComponent.h"
  37. #include "UiMaskComponent.h"
  38. #include "UiLayoutCellComponent.h"
  39. #include "UiLayoutColumnComponent.h"
  40. #include "UiLayoutRowComponent.h"
  41. #include "UiLayoutGridComponent.h"
  42. #include "UiParticleEmitterComponent.h"
  43. #include "UiFlipbookAnimationComponent.h"
  44. #include "UiRadioButtonComponent.h"
  45. #include "UiRadioButtonGroupComponent.h"
  46. #include "UiTooltipComponent.h"
  47. #include "UiTooltipDisplayComponent.h"
  48. #include "UiDynamicLayoutComponent.h"
  49. #include "UiDynamicScrollBoxComponent.h"
  50. #include "UiNavigationSettings.h"
  51. #include "LyShinePass.h"
  52. namespace LyShine
  53. {
  54. const AZStd::list<AZ::ComponentDescriptor*>* LyShineSystemComponent::m_componentDescriptors = nullptr;
  55. ////////////////////////////////////////////////////////////////////////////////////////////////////
  56. void LyShineSystemComponent::Reflect(AZ::ReflectContext* context)
  57. {
  58. UiSerialize::ReflectUiTypes(context);
  59. UiCanvasFileObject::Reflect(context);
  60. UiNavigationSettings::Reflect(context);
  61. if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  62. {
  63. serialize->Class<LyShineSystemComponent, AZ::Component>()
  64. ->Version(1)
  65. ->Attribute(AZ::Edit::Attributes::SystemComponentTags, AZStd::vector<AZ::Crc32>({ AZ_CRC_CE("AssetBuilder") }))
  66. ->Field("CursorImagePath", &LyShineSystemComponent::m_cursorImagePathname);
  67. if (AZ::EditContext* ec = serialize->GetEditContext())
  68. {
  69. auto editInfo = ec->Class<LyShineSystemComponent>("LyShine", "In-game User Interface System");
  70. editInfo->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  71. ->Attribute(AZ::Edit::Attributes::Category, "UI")
  72. ->Attribute(AZ::Edit::Attributes::AutoExpand, true);
  73. editInfo->DataElement(0, &LyShineSystemComponent::m_cursorImagePathname, "CursorImagePath", "The cursor image path.")
  74. ->Attribute(AZ::Edit::Attributes::ChangeNotify, &LyShineSystemComponent::BroadcastCursorImagePathname);
  75. }
  76. }
  77. if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
  78. {
  79. behaviorContext->EBus<UiCanvasManagerBus>("UiCanvasManagerBus")
  80. ->Event("CreateCanvas", &UiCanvasManagerBus::Events::CreateCanvas)
  81. ->Event("LoadCanvas", &UiCanvasManagerBus::Events::LoadCanvas)
  82. ->Event("UnloadCanvas", &UiCanvasManagerBus::Events::UnloadCanvas)
  83. ->Event("FindLoadedCanvasByPathName", &UiCanvasManagerBus::Events::FindLoadedCanvasByPathName)
  84. ;
  85. behaviorContext->EBus<UiCursorBus>("UiCursorBus")
  86. ->Event("IncrementVisibleCounter", &UiCursorBus::Events::IncrementVisibleCounter)
  87. ->Event("DecrementVisibleCounter", &UiCursorBus::Events::DecrementVisibleCounter)
  88. ->Event("IsUiCursorVisible", &UiCursorBus::Events::IsUiCursorVisible)
  89. ->Event("SetUiCursor", &UiCursorBus::Events::SetUiCursor)
  90. ->Event("GetUiCursorPosition", &UiCursorBus::Events::GetUiCursorPosition)
  91. ->Event("SetUiCursorPosition", &UiCursorBus::Events::SetUiCursorPosition)
  92. ;
  93. }
  94. LyShineFeatureProcessor::Reflect(context);
  95. }
  96. ////////////////////////////////////////////////////////////////////////////////////////////////////
  97. void LyShineSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  98. {
  99. provided.push_back(AZ_CRC_CE("LyShineService"));
  100. }
  101. ////////////////////////////////////////////////////////////////////////////////////////////////////
  102. void LyShineSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  103. {
  104. incompatible.push_back(AZ_CRC_CE("LyShineService"));
  105. }
  106. ////////////////////////////////////////////////////////////////////////////////////////////////////
  107. void LyShineSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
  108. {
  109. #if !defined(LYSHINE_BUILDER) && !defined(LYSHINE_TESTS)
  110. required.push_back(AZ_CRC_CE("RPISystem"));
  111. #endif
  112. }
  113. ////////////////////////////////////////////////////////////////////////////////////////////////////
  114. void LyShineSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent)
  115. {
  116. dependent.push_back(AZ_CRC_CE("AssetDatabaseService"));
  117. dependent.push_back(AZ_CRC_CE("AssetCatalogService"));
  118. }
  119. ////////////////////////////////////////////////////////////////////////////////////////////////////
  120. void LyShineSystemComponent::SetLyShineComponentDescriptors(const AZStd::list<AZ::ComponentDescriptor*>* descriptors)
  121. {
  122. m_componentDescriptors = descriptors;
  123. }
  124. ////////////////////////////////////////////////////////////////////////////////////////////////////
  125. LyShineSystemComponent::LyShineSystemComponent()
  126. {
  127. m_cursorImagePathname.SetAssetPath("Textures/Cursor_Default.tif");
  128. }
  129. ////////////////////////////////////////////////////////////////////////////////////////////////////
  130. void LyShineSystemComponent::Init()
  131. {
  132. }
  133. ////////////////////////////////////////////////////////////////////////////////////////////////////
  134. void LyShineSystemComponent::Activate()
  135. {
  136. UiSystemBus::Handler::BusConnect();
  137. UiSystemToolsBus::Handler::BusConnect();
  138. UiFrameworkBus::Handler::BusConnect();
  139. CrySystemEventBus::Handler::BusConnect();
  140. // register all the component types internal to the LyShine module
  141. // These are registered in the order we want them to appear in the Add Component menu
  142. RegisterComponentTypeForMenuOrdering(UiCanvasComponent::RTTI_Type());
  143. RegisterComponentTypeForMenuOrdering(UiElementComponent::RTTI_Type());
  144. RegisterComponentTypeForMenuOrdering(UiHierarchyInteractivityToggleComponent::RTTI_Type());
  145. RegisterComponentTypeForMenuOrdering(UiTransform2dComponent::RTTI_Type());
  146. RegisterComponentTypeForMenuOrdering(UiImageComponent::RTTI_Type());
  147. RegisterComponentTypeForMenuOrdering(UiImageSequenceComponent::RTTI_Type());
  148. RegisterComponentTypeForMenuOrdering(UiTextComponent::RTTI_Type());
  149. RegisterComponentTypeForMenuOrdering(UiButtonComponent::RTTI_Type());
  150. RegisterComponentTypeForMenuOrdering(UiMarkupButtonComponent::RTTI_Type());
  151. RegisterComponentTypeForMenuOrdering(UiCheckboxComponent::RTTI_Type());
  152. RegisterComponentTypeForMenuOrdering(UiRadioButtonComponent::RTTI_Type());
  153. RegisterComponentTypeForMenuOrdering(UiRadioButtonGroupComponent::RTTI_Type());
  154. RegisterComponentTypeForMenuOrdering(UiSliderComponent::RTTI_Type());
  155. RegisterComponentTypeForMenuOrdering(UiTextInputComponent::RTTI_Type());
  156. RegisterComponentTypeForMenuOrdering(UiScrollBarComponent::RTTI_Type());
  157. RegisterComponentTypeForMenuOrdering(UiScrollBoxComponent::RTTI_Type());
  158. RegisterComponentTypeForMenuOrdering(UiDraggableComponent::RTTI_Type());
  159. RegisterComponentTypeForMenuOrdering(UiDropTargetComponent::RTTI_Type());
  160. RegisterComponentTypeForMenuOrdering(UiDropdownComponent::RTTI_Type());
  161. RegisterComponentTypeForMenuOrdering(UiDropdownOptionComponent::RTTI_Type());
  162. RegisterComponentTypeForMenuOrdering(UiFaderComponent::RTTI_Type());
  163. RegisterComponentTypeForMenuOrdering(UiMaskComponent::RTTI_Type());
  164. RegisterComponentTypeForMenuOrdering(UiLayoutColumnComponent::RTTI_Type());
  165. RegisterComponentTypeForMenuOrdering(UiLayoutRowComponent::RTTI_Type());
  166. RegisterComponentTypeForMenuOrdering(UiLayoutGridComponent::RTTI_Type());
  167. RegisterComponentTypeForMenuOrdering(UiLayoutCellComponent::RTTI_Type());
  168. RegisterComponentTypeForMenuOrdering(UiLayoutFitterComponent::RTTI_Type());
  169. RegisterComponentTypeForMenuOrdering(UiTooltipComponent::RTTI_Type());
  170. RegisterComponentTypeForMenuOrdering(UiTooltipDisplayComponent::RTTI_Type());
  171. RegisterComponentTypeForMenuOrdering(UiDynamicLayoutComponent::RTTI_Type());
  172. RegisterComponentTypeForMenuOrdering(UiDynamicScrollBoxComponent::RTTI_Type());
  173. RegisterComponentTypeForMenuOrdering(UiParticleEmitterComponent::RTTI_Type());
  174. RegisterComponentTypeForMenuOrdering(UiFlipbookAnimationComponent::RTTI_Type());
  175. #if !defined(LYSHINE_BUILDER) && !defined(LYSHINE_TESTS)
  176. // Add LyShine pass
  177. auto* passSystem = AZ::RPI::PassSystemInterface::Get();
  178. AZ_Assert(passSystem, "Cannot get the pass system.");
  179. passSystem->AddPassCreator(AZ::Name("LyShinePass"), &LyShine::LyShinePass::Create);
  180. passSystem->AddPassCreator(AZ::Name("LyShineChildPass"), &LyShine::LyShineChildPass::Create);
  181. passSystem->AddPassCreator(AZ::Name("RttChildPass"), &LyShine::RttChildPass::Create);
  182. // Setup handler for load pass template mappings
  183. m_loadTemplatesHandler = AZ::RPI::PassSystemInterface::OnReadyLoadTemplatesEvent::Handler([this]() { this->LoadPassTemplateMappings(); });
  184. AZ::RPI::PassSystemInterface::Get()->ConnectEvent(m_loadTemplatesHandler);
  185. // Register feature processor
  186. AZ::RPI::FeatureProcessorFactory::Get()->RegisterFeatureProcessor<LyShineFeatureProcessor>();
  187. #endif
  188. }
  189. ////////////////////////////////////////////////////////////////////////////////////////////////////
  190. void LyShineSystemComponent::Deactivate()
  191. {
  192. #if !defined(LYSHINE_BUILDER) && !defined(LYSHINE_TESTS)
  193. m_loadTemplatesHandler.Disconnect();
  194. AZ::RPI::FeatureProcessorFactory::Get()->UnregisterFeatureProcessor<LyShineFeatureProcessor>();
  195. #endif
  196. UiSystemBus::Handler::BusDisconnect();
  197. UiSystemToolsBus::Handler::BusDisconnect();
  198. UiFrameworkBus::Handler::BusDisconnect();
  199. CrySystemEventBus::Handler::BusDisconnect();
  200. }
  201. ////////////////////////////////////////////////////////////////////////////////////////////////////
  202. void LyShineSystemComponent::RegisterComponentTypeForMenuOrdering(const AZ::Uuid& typeUuid)
  203. {
  204. m_componentTypes.push_back(typeUuid);
  205. }
  206. ////////////////////////////////////////////////////////////////////////////////////////////////////
  207. const AZStd::vector<AZ::Uuid>* LyShineSystemComponent::GetComponentTypesForMenuOrdering()
  208. {
  209. return &m_componentTypes;
  210. }
  211. ////////////////////////////////////////////////////////////////////////////////////////////////////
  212. const AZStd::list<AZ::ComponentDescriptor*>* LyShineSystemComponent::GetLyShineComponentDescriptors()
  213. {
  214. return m_componentDescriptors;
  215. }
  216. ////////////////////////////////////////////////////////////////////////////////////////////////////
  217. UiSystemToolsInterface::CanvasAssetHandle* LyShineSystemComponent::LoadCanvasFromStream(AZ::IO::GenericStream& stream, const AZ::ObjectStream::FilterDescriptor& filterDesc)
  218. {
  219. return UiCanvasFileObject::LoadCanvasFromStream(stream, filterDesc);
  220. }
  221. ////////////////////////////////////////////////////////////////////////////////////////////////////
  222. void LyShineSystemComponent::SaveCanvasToStream(UiSystemToolsInterface::CanvasAssetHandle* canvas, AZ::IO::FileIOStream& stream)
  223. {
  224. UiCanvasFileObject* canvasFileObject = static_cast<UiCanvasFileObject*>(canvas);
  225. UiCanvasFileObject::SaveCanvasToStream(stream, canvasFileObject);
  226. }
  227. ////////////////////////////////////////////////////////////////////////////////////////////////////
  228. AZ::Entity* LyShineSystemComponent::GetRootSliceEntity(CanvasAssetHandle* canvas)
  229. {
  230. UiCanvasFileObject* canvasFileObject = static_cast<UiCanvasFileObject*>(canvas);
  231. return canvasFileObject->m_rootSliceEntity;
  232. }
  233. ////////////////////////////////////////////////////////////////////////////////////////////////////
  234. AZ::Entity* LyShineSystemComponent::GetCanvasEntity(CanvasAssetHandle* canvas)
  235. {
  236. UiCanvasFileObject* canvasFileObject = static_cast<UiCanvasFileObject*>(canvas);
  237. return canvasFileObject->m_canvasEntity;
  238. }
  239. ////////////////////////////////////////////////////////////////////////////////////////////////////
  240. AZ::SliceComponent* LyShineSystemComponent::GetRootSliceSliceComponent(UiSystemToolsInterface::CanvasAssetHandle* canvas)
  241. {
  242. UiCanvasFileObject* canvasFileObject = static_cast<UiCanvasFileObject*>(canvas);
  243. AZ::Entity* rootSliceEntity = canvasFileObject->m_rootSliceEntity;
  244. if (rootSliceEntity->GetState() == AZ::Entity::State::Constructed)
  245. {
  246. rootSliceEntity->Init();
  247. }
  248. AZ::SliceComponent* sliceComponent = rootSliceEntity->FindComponent<AZ::SliceComponent>();
  249. return sliceComponent;
  250. }
  251. ////////////////////////////////////////////////////////////////////////////////////////////////////
  252. void LyShineSystemComponent::ReplaceRootSliceSliceComponent(UiSystemToolsInterface::CanvasAssetHandle* canvas, AZ::SliceComponent* newSliceComponent)
  253. {
  254. UiCanvasFileObject* canvasFileObject = static_cast<UiCanvasFileObject*>(canvas);
  255. AZ::Entity* oldRootSliceEntity = canvasFileObject->m_rootSliceEntity;
  256. AZ::EntityId idToReuse = oldRootSliceEntity->GetId();
  257. AZ::Entity* newRootSliceEntity = aznew AZ::Entity(idToReuse, AZStd::to_string(static_cast<AZ::u64>(idToReuse)).c_str());
  258. newRootSliceEntity->AddComponent(newSliceComponent);
  259. canvasFileObject->m_rootSliceEntity = newRootSliceEntity;
  260. delete oldRootSliceEntity;
  261. }
  262. ////////////////////////////////////////////////////////////////////////////////////////////////////
  263. void LyShineSystemComponent::ReplaceCanvasEntity(UiSystemToolsInterface::CanvasAssetHandle* canvas, AZ::Entity* newCanvasEntity)
  264. {
  265. UiCanvasFileObject* canvasFileObject = static_cast<UiCanvasFileObject*>(canvas);
  266. canvasFileObject->m_canvasEntity = newCanvasEntity;
  267. }
  268. ////////////////////////////////////////////////////////////////////////////////////////////////////
  269. void LyShineSystemComponent::DestroyCanvas(CanvasAssetHandle* canvas)
  270. {
  271. UiCanvasFileObject* canvasFileObject = static_cast<UiCanvasFileObject*>(canvas);
  272. delete canvasFileObject->m_canvasEntity;
  273. delete canvasFileObject->m_rootSliceEntity;
  274. delete canvasFileObject;
  275. }
  276. ////////////////////////////////////////////////////////////////////////////////////////////////////
  277. bool LyShineSystemComponent::HasUiElementComponent(AZ::Entity* entity)
  278. {
  279. return entity->FindComponent<UiElementComponent>() != nullptr;
  280. }
  281. ////////////////////////////////////////////////////////////////////////////////////////////////////
  282. void LyShineSystemComponent::AddEditorOnlyEntity(AZ::Entity* editorOnlyEntity, EntityIdSet& editorOnlyEntities)
  283. {
  284. // All descendents of an editor-only entity are considered editor-only also.
  285. // Iterate through all the descedents of the given entity and add their IDs
  286. // to the list of editor-only entities.
  287. AZStd::vector<AZ::Entity*> childEntities = { editorOnlyEntity };
  288. while (!childEntities.empty())
  289. {
  290. AZ::Entity* parentEntity = childEntities.back();
  291. childEntities.pop_back();
  292. editorOnlyEntities.insert(parentEntity->GetId());
  293. UiElementComponent* elementComponent = parentEntity->FindComponent<UiElementComponent>();
  294. if (elementComponent)
  295. {
  296. int numChildren = elementComponent->GetNumChildElements();
  297. for (int i = 0; i < numChildren; ++i)
  298. {
  299. childEntities.push_back(elementComponent->GetChildElement(i));
  300. }
  301. }
  302. }
  303. }
  304. ////////////////////////////////////////////////////////////////////////////////////////////////////
  305. void LyShineSystemComponent::HandleEditorOnlyEntities(const EntityList& exportSliceEntities, const EntityIdSet& editorOnlyEntityIds)
  306. {
  307. AZStd::unordered_map<AZ::EntityId, AZStd::vector<AZ::EntityId>> parentToChildren;
  308. // Build a map of entity Ids to their parent Ids, for faster lookup during processing.
  309. for (AZ::Entity* exportParentEntity : exportSliceEntities)
  310. {
  311. UiElementComponent* exportParentComponent = exportParentEntity->FindComponent<UiElementComponent>();
  312. if (!exportParentComponent)
  313. {
  314. continue;
  315. }
  316. // Map the child entities to the parent ID
  317. int numChildElements = exportParentComponent->GetNumChildElements();
  318. for (int exportChildIndex = 0; exportChildIndex < numChildElements; ++exportChildIndex)
  319. {
  320. AZ::EntityId childExportEntity = exportParentComponent->GetChildEntityId(exportChildIndex);
  321. parentToChildren[exportParentEntity->GetId()].push_back(childExportEntity);
  322. }
  323. }
  324. // Remove editor-only entities from parent hierarchy
  325. for (AZ::Entity* exportParentEntity : exportSliceEntities)
  326. {
  327. for (AZ::EntityId exportChildEntity : parentToChildren[exportParentEntity->GetId()])
  328. {
  329. const bool childIsEditorOnly = editorOnlyEntityIds.end() != editorOnlyEntityIds.find(exportChildEntity);
  330. if (childIsEditorOnly)
  331. {
  332. UiElementComponent* exportParentComponent = exportParentEntity->FindComponent<UiElementComponent>();
  333. exportParentComponent->RemoveChild(exportChildEntity);
  334. }
  335. }
  336. }
  337. }
  338. ///////////////////////////////////////////////////////////////////////////////////////////////
  339. void LyShineSystemComponent::OnCrySystemInitialized(ISystem& system, [[maybe_unused]] const SSystemInitParams& startupParams)
  340. {
  341. #if !defined(AZ_MONOLITHIC_BUILD)
  342. // When module is linked dynamically, we must set our gEnv pointer.
  343. // When module is linked statically, we'll share the application's gEnv pointer.
  344. gEnv = system.GetGlobalEnvironment();
  345. #endif
  346. m_lyShine = AZStd::make_unique<CLyShine>();
  347. AZ::Interface<ILyShine>::Register(m_lyShine.get());
  348. system.GetILevelSystem()->AddListener(this);
  349. BroadcastCursorImagePathname();
  350. if (AZ::Interface<ILyShine>::Get())
  351. {
  352. AZ::Interface<ILyShine>::Get()->PostInit();
  353. }
  354. }
  355. ///////////////////////////////////////////////////////////////////////////////////////////////
  356. void LyShineSystemComponent::OnCrySystemShutdown(ISystem& system)
  357. {
  358. system.GetILevelSystem()->RemoveListener(this);
  359. if (m_lyShine)
  360. {
  361. AZ::Interface<ILyShine>::Unregister(m_lyShine.get());
  362. m_lyShine.reset();
  363. }
  364. }
  365. ////////////////////////////////////////////////////////////////////////
  366. void LyShineSystemComponent::OnUnloadComplete([[maybe_unused]] const char* levelName)
  367. {
  368. // Perform level unload procedures for the LyShine UI system
  369. if (AZ::Interface<ILyShine>::Get())
  370. {
  371. AZ::Interface<ILyShine>::Get()->OnLevelUnload();
  372. }
  373. }
  374. ////////////////////////////////////////////////////////////////////////////////////////////////////
  375. void LyShineSystemComponent::BroadcastCursorImagePathname()
  376. {
  377. UiCursorBus::Broadcast(&UiCursorInterface::SetUiCursor, m_cursorImagePathname.GetAssetPath().c_str());
  378. }
  379. #if !defined(LYSHINE_BUILDER) && !defined(LYSHINE_TESTS)
  380. ////////////////////////////////////////////////////////////////////////////////////////////////////
  381. void LyShineSystemComponent::LoadPassTemplateMappings()
  382. {
  383. const char* passTemplatesFile = "Passes/LyShinePassTemplates.azasset";
  384. AZ::RPI::PassSystemInterface::Get()->LoadPassTemplateMappings(passTemplatesFile);
  385. }
  386. #endif
  387. }