| | 1 | | using DCL.Emotes; |
| | 2 | | using DCLServices.WearablesCatalogService; |
| | 3 | | using MainScripts.DCL.Controllers.HUD.CharacterPreview; |
| | 4 | |
|
| | 5 | | namespace DCL.AvatarEditor |
| | 6 | | { |
| | 7 | | public class AvatarEditorHUDPlugin : IPlugin |
| | 8 | | { |
| | 9 | | private readonly AvatarEditorHUDController hudController; |
| | 10 | |
|
| 0 | 11 | | public AvatarEditorHUDPlugin() |
| | 12 | | { |
| 0 | 13 | | ServiceLocator serviceLocator = Environment.i.serviceLocator; |
| | 14 | |
|
| 0 | 15 | | hudController = new AvatarEditorHUDController( |
| | 16 | | DataStore.i.featureFlags, |
| | 17 | | Environment.i.platform.serviceProviders.analytics, |
| | 18 | | serviceLocator.Get<IWearablesCatalogService>(), |
| | 19 | | new UserProfileWebInterfaceBridge()); |
| | 20 | |
|
| | 21 | | // there could be a race condition going on if we initialize the avatar editor before the feature flags are |
| | 22 | | // WearablesCatalogServiceProxy.wearablesCatalogServiceInUse is not defined when is needed to retrieve the w |
| | 23 | | // since this plugin is bound to backpack_editor_v1 we assume that the feature flags has been already initia |
| 0 | 24 | | hudController.Initialize(false, new PreviewCameraRotationController()); |
| 0 | 25 | | } |
| | 26 | |
|
| | 27 | | public void Dispose() |
| | 28 | | { |
| 0 | 29 | | hudController.Dispose(); |
| 0 | 30 | | } |
| | 31 | | } |
| | 32 | | } |