protected virtual void Start() { _gameManager = FindObjectOfType <GameManager>(); _pixelGridSnapper = _gameManager.PixelGridSnapper; _pixelGridSnapper.SnapToTexelGrid(_childTransformToSnapToGrid, transform); }
protected virtual void PlaceObjectFromPool(Vector3 position, PixelGridSnapper gridSnapper) { PlaceObjectFromPool(position); ScrollingGameObject tempScrollingObject = _tempObject.GetComponent <ScrollingGameObject>(); if (!tempScrollingObject.ChildTransformToSnapToGrid.gameObject.activeSelf) { tempScrollingObject.SwitchVisibility(); } gridSnapper.SnapToTexelGrid(tempScrollingObject.ChildTransformToSnapToGrid, _tempObject.transform); }