LyShineSystemComponent.cpp 21 KB

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