private void Awake() { i = this; usersInfoPool = PoolManager.i.GetPool(MINIMAP_USER_ICONS_POOL_NAME); if (usersInfoPool == null) { usersInfoPool = PoolManager.i.AddPool( MINIMAP_USER_ICONS_POOL_NAME, Instantiate(userIconPrefab.gameObject, overlayContainer.transform), maxPrewarmCount: MINIMAP_USER_ICONS_MAX_PREWARM, isPersistent: true); usersInfoPool.ForcePrewarm(); } NAVMAP_CHUNK_LAYER = LayerMask.NameToLayer("NavmapChunk"); MinimapMetadata.GetMetadata().OnSceneInfoUpdated += MapRenderer_OnSceneInfoUpdated; MinimapMetadata.GetMetadata().OnUserInfoUpdated += MapRenderer_OnUserInfoUpdated; MinimapMetadata.GetMetadata().OnUserInfoRemoved += MapRenderer_OnUserInfoRemoved; ParcelHighlightButton.onClick.AddListener(() => { ClickMousePositionParcel(); }); playerWorldPosition.OnChange += OnCharacterMove; playerRotation.OnChange += OnCharacterRotate; parcelHighlightImage.rectTransform.localScale = new Vector3(parcelHightlightScale, parcelHightlightScale, 1f); parcelHoldCountdown = parcelHoldTimeInSeconds; }
public void EnsureEntityPool() // TODO: Move to PoolManagerFactory { if (PoolManager.i.ContainsPool(EMPTY_GO_POOL_NAME)) { return; } GameObject go = new GameObject(); Pool pool = PoolManager.i.AddPool(EMPTY_GO_POOL_NAME, go, maxPrewarmCount: 2000, isPersistent: true); if (prewarmEntitiesPool) { pool.ForcePrewarm(); } }
private void EnsurePools() { usersInfoPool = PoolManager.i.GetPool(MINIMAP_USER_ICONS_POOL_NAME); if (usersInfoPool == null) { usersInfoPool = PoolManager.i.AddPool( MINIMAP_USER_ICONS_POOL_NAME, Instantiate(userIconPrefab.gameObject, overlayContainer.transform), maxPrewarmCount: MINIMAP_USER_ICONS_MAX_PREWARM, isPersistent: true); if (!Configuration.EnvironmentSettings.RUNNING_TESTS) { usersInfoPool.ForcePrewarm(); } } }