Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ollyisonit/unityplanerenderer
Unity component that simplifies rendering image planes in 3D space.
https://github.com/ollyisonit/unityplanerenderer
Last synced: about 2 months ago
JSON representation
Unity component that simplifies rendering image planes in 3D space.
- Host: GitHub
- URL: https://github.com/ollyisonit/unityplanerenderer
- Owner: ollyisonit
- License: gpl-3.0
- Created: 2020-07-13T23:32:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-02T06:24:05.000Z (9 months ago)
- Last Synced: 2024-04-03T05:24:20.074Z (9 months ago)
- Language: C#
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unity Plane Renderer
Unity component that simplifies rendering image planes in 3D space.![](readme-assets/UnityPlaneRendererIcon.jpg)
## Features
- Automatically scales images to avoid stretching
- Set different images for front and back of plane
- Share one material between multiple PlaneRenderers without conflict
- Supports transparent materials and shadows
- Updates automatically when editor values are changed## How To Use
Attach the PlaneRenderer script to the object that you want to add an image to. Two child objects will be created--one for the front of the image and one for the back. Do not edit these objects directly, or add or remove children from the object with the PlaneRenderer attached. The PlaneRenderer will give you the following options:
- `Front Image`: The texture to use for the front of the plane (facing along the local Z axis). `Sprite2D` works well here.
- `Back Image`: The texture to use for the back of the plane (facing against the local Z axis)
- `Mirror Back Image`: Should the texture for the back image be mirrored? (this is useful if the front and back images are the same and you want them to line up)
- `Pixels Per Meter`: How many pixels in the image are equivalent to one meter in Unity?
- `Anchor Point`: Location of the image's transform anchor, where (0,0) is in the bottom left corner and (1,1) is the top right
- `Material`: The material to use for rendering the image. If this field is null, nothing will display. The plane renderer copies its material before using it, so materials can be shared between PlaneRenderers and other objects without issue. Generally, a standard shader set to cutout mode works well.
- `Offset`: How far should the front and back planes be offset from the center? This is useful for preventing lighting errors if you want the PlaneRenderer to cast shadows
- `Cast Shadows`: How should shadows be handled?
## Installation
[Download](https://github.com/ollyisonit/UnityPlaneRenderer/releases/latest) or clone this repository and add it to your Unity project assets folder.## Dependencies
This library requires that you have the [UnityEditorAttributes](https://github.com/ollyisonit/UnityEditorAttributes) library installed.