Scroll layer component.
Scroll layers represent each parallax layer, and can be both in the foreground and background. Scroll layers are sorted by their weight - this can be done automatically, or manually overriden. Layers can also be stretched across the screen or pixel-perfect. Note that scroll layers are independent of Unity's layer system.
Overview
The Auto-Billboard Scroll Layer automatically creates a billboard (camera-facing mesh) and scrolls the UVs of a texture placed on it. Only orthographic cameras are officially supported in this mode.
- See also:
- ThinksquirrelSoftware.Thinkscroller.ScrollLayer
Properties
- Main
- Current Mode - Displays the current scrolling mode.
- Auto Weights - If enabled, weights will automatically be calculated based on the layer's distance from the parallax camera.
- Update Layers - Updates the weights in the parallax manager. This is usually automatic.
- Weight - The layer's weight. Heavier weights (higher values) move more slowly than lighter weights.
- Layer Speed - Displays the speed of the layer, calculated by its weight.
- Speed Modifier - A modifier that is multiplied with the layer speed.
- Auto Billboard - This must be enabled for this mode.
- X, Y - The size of the billboard (in world units). This is disabled if the layer is in pixel-perfect mode.
- Stretch - Stretches the billboard to fill the screen. This is disabled if the layer is in pixel-perfect mode.
- Pixel Perfect - If enabled, the billboard's screen size will match the size of the texture, for pixel-perfect rendering.
- Texture - The texture to scroll.
- Dimensions - Displays the dimensions of the selected texture.
- Advanced
- Alignment - The screen alignment for the billboard.
- Offset X, Offset Y - The offset for the billboard, in pixel space (unless overriden through script).
- UV Padding - The inset for the layer UVs, in UV (0..1) space. If there are lines visible at the edges, set this to a low negative value.
- Tile X - If enabled, repeat the billboard on the X axis. (Pixel-perfect only)
- Tile Y - If enabled, repeat the billboard on the Y axis. (Pixel-perfect only)
- Border X, Border Y - Additional texture correction, in pixel space. This should usually stay at 0. (Pixel-perfect only)
- Normals, Tangents - Determines whether normal or tangent information should be calculated for the billboard.
- On Awake()... - Determines if and how billboards are refreshed on Awake.
- Refresh Now - Refresh the billboard now, in the editor. This is usually automatic.
Texture Names
- Texture Names Array - Use this when using a custom shader. Texture Names correspond to the names in a shader. Thinkscroller will only scroll the listed texture names. Defaults to _MainTex.
Navigation