Get Parallax Scrolling VZ on the Unity Asset Store Purchase NowTry It Here

Parallax Scrolling VZ is an easy-to-use framework to create parallax scrolling backgrounds in Unity.

It includes three types of scrolling methods:
+++

OffsetScrolling:
constant infinite scrolling using UV texture wrapping
++++++++
++++++++

CharacterBasedCameraFollow_NotInfinite:
parallax scrolling based on character movement – camera follows the character and textures DO NOT repeat
++++++++

CharacterBasedCameraFollow_Infinite:
parallax scrolling based on character movement – camera follows the character and textures repeat
++++++++
++++++++

Features

  • Easy-to-setup Horizontal & Vertical Parallax scrolling for 2D Games
  • Uses orthographic cameras
  • 3 Types of Parallax included: Infinite Texture Offset, Non-Infinite Camera Follow, and Infinite Camera Follow
  • Uses texture quads
  • Infinitely wrap textures along both X and Y axis
  • Parallax scrolling based on the camera following the character’s movement
  • Custom inspector for texture offset scrolling
  • Ability to find pixel-perfect X & Y scale for your textures
  • Prefabs with camera & layers attached for easy change out
  • Ability to change scrolling speed & Z-depth for each background layer
  • C# scripts
  • Demo scenes

Package Folders

  • Editor: The C# files associated with the customer editors used with PVZ_FindScale & PVZ_TextureOffset
  • PVZ Background Textures & Materials: The textures & materials used in the scrolling prefabs. Used as placeholders and samples.
  • PVZ Character Based Parallax: contains materials to create an infinite character based scrolling background, and a non-infinite character based with camera follow background. Contains subfolders:
    ExampleScenes: demo scenes to see how to use the prefabs
    Prefabs: prefabs for the example scenes
    Scripts: C# files associate with these 2 scrolling methods
  • PVZ Offset Scrolling Parallax: contains materials to create a constant infinite scrolling background. Contains subfolders:
    ExampleScene: demo scene to see how to use the prefabs
    Prefabs: prefabs to use with offset scrolling
    Scripts: C# files associated with offset scrolling

Installation

Import the entire package into your project via the Asset Store.
++++++++Window->Asset Store-> Then find the asset ->Download->Import
If you have already purchased & downloaded the package onto your computer:
++++++++Assets->Import Package->CustomPackage->

Quick Guide:

Video Tutorials

Usage

– Import the entire package into your project
– Import your background images and make sure they are:
– in power of two size: 32, 64, 128, 256, 512, 1024, 2048, etc (ex. 512px by 1024px)
– texture type: texture
– wrap mode: repeat
textureImport1

– Create a material for each of your background textures (Create->Material in the project window)
createMat
– Decide which type of Parallax you want to do

+++

Texture Offset Parallax Usage:

offsetPrefab

– Find Scrolling_TextureOffset prefab inside PVZ Offset Scrolling Parallax >Prefabs
– Drag the prefab into your scene’s Hierarchy
– You can deactivate the main camera in the scene or you can set culling mask of the Camera_Offset camera to render what you want
– Pick the layer you want to change and drag your background material onto the layer in the Hierarchy – Repeat for all the layers you need
– if you have extra layers then you can deactivate in the inspector or delete them
– if you need to add another layer you can duplicate one in the scene or drag BackgroundLayer prefab into the hierarchy nested with the other layers. And then drag your material onto that new layer
– On each background layer set the desired axis, direction & speed in the PVZ_Texture Offset script in the inspector
– Change the X & Y scale of your layer depending on the size needed for your background (ex. if you are scrolling horizontally then you need to find the x scale that best fills the screen and then find the appropriate Y scale). The find Pixel Perfect Scale in PVZ_Texture Offset inspector area can help you with this.
– The depths for Scrolling_TextureOffset prefab have been preset but you can change the depth of each layer by changing their Z position
– You may need to add a Background layer in the inspector and set your background textures to that layer & set the camera culling mask to that Background layer
– Once you have your desired options set then Play the Scene
– Tweak scrolling speed and/or depth if need be

Screen Shot 2015-02-23 at 12.00.24 PM

+++

Infinite Camera Follow Usage:

– Find PVZ_CamFollowInfinite prefab inside PVZ Character Based Parallax folder -> Prefabs
– Drag the prefab into your scene’s Hierarchy
– Deactivate the default main camera
– Pick the layer you want to change and drag your background material onto the layer in the Hierarchy – Repeat for all the layers you need
– Change the X & Y scale of your layers to meet your textures needs (if you need help finding a pixel perfect scale then drag the PVZ_FindScale script found inside the Offset Parallax folder to your layer and then set either X or Y to your desired value and it will tell you the other)
– Set a scrolling speed & axis inside the inspector for each layer
– Drag your character sprite into the scene & setup your needed character controller & rigidbody
– Drag your character object into the “Target” area of the PVZ_Camera_Follow Cam for Infinite script in the inspector – Located on theMainCamera object
– Create a Layer in the inspector called “Background” and set all your background layers in the prefab to this Layer.
– In the Camera_PVZ_CameraFollowForInfinite camera set the culling mask to only be that “Background” layer that you created in the previous step
– Then make sure theMainCamera camera doesn’t have “Background” selected in its culling mask
– deactivate the sample character & change out the ground sprite if needed
– deactivate unused background layers
– Play the scene
– Tweak scrolling speed and/or depth if need be
– if you run into clipping issues make sure your camera’s size for Camera_PVZ_CameraFollowForInfinite is smaller than that of the camera theMainCamera

+++

Non-Infinite Camera Follow Usage:

cameraFollowPrefab

– Find PVZ_WithCamFollow prefab inside PVZ Character Based Parallax folder -> Prefabs
– Drag the prefab into your scene’s Hierarchy
– Deactivate the main camera
– Pick the layer you want to change and drag your background material onto the layer in the Hierarchy – Repeat for all the layers you need
– Change the X & Y scale of your layers to meet your textures needs (if you need help finding a pixel perfect scale then drag the PVZ_FindScale script found inside the Offset Parallax folder to your layer and then set either X or Y to your desired value and it will tell you the other)
– Set a scrolling speed & axis inside the inspector for each layer
– Drag the desired camera into “The Cam” area in each layer (ONLY IF DIFFERENT THAN ATTACHED CAMERA – And if different then Camera_FollowChar script must be attached to the new camera)
– Drag your character sprite into the scene & setup your needed character controller & rigidbody
– Drag your character object into the “The Character” area of the PVZ_NotInfinite_CameraFollow script in the inspector for each layer
– Drag your new character onto the camera’s script Camera_FollowChar inside the target field
– deactivate the sample character & change out the ground sprite if needed
– deactivate unused background layers
– Play the scene
– Tweak scrolling speed and/or depth if need be

Screen Shot 2015-02-23 at 11.57.48 AM

+++

FindScale Script

Screen Shot 2015-02-23 at 12.25.36 PM
– Drag the script onto a texture you want to use as a background
– Change your X scale to stretch the entire width of the Game screen size
(if you are doing horizontal scrolling, Change Y if doing Vertical)
– Once you find a good X scale for your texture put that value into the Scale X field and it will give you the Y value you should use for pixel perfect
(if doing Vertical scrolling, find good Y scale and insert that value in instead of X)

Video Tutorials

https://youtube.com/watch?v=iNNOhnNQLWs%3Frel%3D0

Usage

– Import the entire package into your project
– Import your background images and make sure they are:
– in power of two size: 32, 64, 128, 256, 512, 1024, 2048, etc (ex. 512px by 1024px)
– texture type: texture
– wrap mode: repeat
textureImport1

– Create a material for each of your background textures (Create->Material in the project window)
createMat
– Decide which type of Parallax you want to do

+++

Texture Offset Parallax Usage:

offsetPrefab

– Find Scrolling_TextureOffset prefab inside PVZ Offset Scrolling Parallax >Prefabs
– Drag the prefab into your scene’s Hierarchy
– You can deactivate the main camera in the scene or you can set culling mask of the Camera_Offset camera to render what you want
– Pick the layer you want to change and drag your background material onto the layer in the Hierarchy – Repeat for all the layers you need
– if you have extra layers then you can deactivate in the inspector or delete them
– if you need to add another layer you can duplicate one in the scene or drag BackgroundLayer prefab into the hierarchy nested with the other layers. And then drag your material onto that new layer
– On each background layer set the desired axis, direction & speed in the PVZ_Texture Offset script in the inspector
– Change the X & Y scale of your layer depending on the size needed for your background (ex. if you are scrolling horizontally then you need to find the x scale that best fills the screen and then find the appropriate Y scale). The find Pixel Perfect Scale in PVZ_Texture Offset inspector area can help you with this.
– The depths for Scrolling_TextureOffset prefab have been preset but you can change the depth of each layer by changing their Z position
– You may need to add a Background layer in the inspector and set your background textures to that layer & set the camera culling mask to that Background layer
– Once you have your desired options set then Play the Scene
– Tweak scrolling speed and/or depth if need be

Screen Shot 2015-02-23 at 12.00.24 PM

+++

Character Based No Follow Usage:

charBasedPrefab

– Find PVZ_NoCamFollow_Infinite prefab inside PVZ Character Based Parallax folder -> Prefabs
– Drag the prefab into your scene’s Hierarchy
– Deactivate the main camera
– Pick the layer you want to change and drag your background material onto the layer in the Hierarchy – Repeat for all the layers you need
– Change the X & Y scale of your layers to meet your textures needs (if you need help finding a pixel perfect scale then drag the PVZ_FindScale script found inside the Offset Parallax folder to your layer and then set either X or Y to your desired value and it will tell you the other)
– Set a scrolling speed & axis inside the inspector for each layer
– Drag your character sprite into the scene & setup your needed character controller & rigidbody
– Drag your character object into the “The Character” area of the PVZ_Infinite_CharacterBased script in the inspector for each layer
– deactivate the sample character & change out the ground sprite if needed
– deactivate unused background layers
– Play the scene
– Tweak scrolling speed and/or depth if need be

Screen Shot 2015-02-23 at 12.01.20 PM

+++

Non-Infinite Camera Follow Usage:

cameraFollowPrefab

– Find PVZ_WithCamFollow prefab inside PVZ Character Based Parallax folder -> Prefabs
– Drag the prefab into your scene’s Hierarchy
– Deactivate the main camera
– Pick the layer you want to change and drag your background material onto the layer in the Hierarchy – Repeat for all the layers you need
– Change the X & Y scale of your layers to meet your textures needs (if you need help finding a pixel perfect scale then drag the PVZ_FindScale script found inside the Offset Parallax folder to your layer and then set either X or Y to your desired value and it will tell you the other)
– Set a scrolling speed & axis inside the inspector for each layer
– Drag the desired camera into “The Cam” area in each layer (ONLY IF DIFFERENT THAN ATTACHED CAMERA – And if different then Camera_FollowChar script must be attached to the new camera)
– Drag your character sprite into the scene & setup your needed character controller & rigidbody
– Drag your character object into the “The Character” area of the PVZ_NotInfinite_CameraFollow script in the inspector for each layer
– Drag your new character onto the camera’s script Camera_FollowChar inside the target field
– deactivate the sample character & change out the ground sprite if needed
– deactivate unused background layers
– Play the scene
– Tweak scrolling speed and/or depth if need be

Screen Shot 2015-02-23 at 11.57.48 AM

+++

FindScale Script:

Screen Shot 2015-02-23 at 12.25.36 PM
– Drag the script onto a texture you want to use as a background
– Change your X scale to stretch the entire width of the Game screen size
(if you are doing horizontal scrolling, Change Y if doing Vertical)
– Once you find a good X scale for your texture put that value into the Scale X field and it will give you the Y value you should use for pixel perfect
(if doing Vertical scrolling, find good Y scale and insert that value in instead of X)

v 1.1 – updated 6/9/15

Replaced Character_Based_No_Camera_Follow parallax feature with support for camera follow parallax with infinite texture scrolling. Now as one of the types of parallax you can have the camera follow the character but also have the textures repeat themselves.

SUPPORT

Need technical support or have a question, comment or concern? Email us at: info@vitalzigns.com

Send us a Message