Either place this in:
<project folder>/Packages/package.alloy@4.3.0
or copy this somewhere with folder name package.alloy@4.3.0 and add following line to your <project folder>/Packages/manifest.json dependencies (replace ******* with either absolute or relative path):
"package.alloy" : "file:*******/package.alloy@4.3.0",
This code is provided AS IS with no support guarantees beyond attempting to keep pace with new Unity releases.
Alright, so we're ready to jump into some Alloy goodness, but there's a few things we want to make sure we're ready for depending on what the state of your project is, and what past version of Alloy (if any) are in your project. First and foremost, if you are importing a new version of Alloy into a project where any prior version of Alloy existed, it's probably a good idea to have a backup of it (manual or version controlled), just in case something goes awry.
- Ensure you are in a new blank scene.
- ENSURE that there are NO script errors in your console preventing unity from recompiling assemblies. Alloy will NOT function properly (including our editor scripts), if you attempt to import with standing errors in your project.
Before using Alloy, there a couple things you MUST set up in your project:
- Open Edit->Project Settings->Graphics.
- Set the 'Deferred' setting to 'Custom shader'.
- Open the picker below, and select the 'Alloy Deferred Shading' shader.
- See "Advanced Setup" section for additional options.
- Set the 'Deferred Reflections' setting to 'Custom shader'.
- Open the picker below, and select the 'Alloy Deferred Reflections' shader.
- Open Edit->Project Settings->Player.
- Open the 'Other Settings' rollout.
- Set 'Color Space' to 'Linear'.
- If you wish to use many lights, set 'Rendering Path' to 'Deferred'.
- Select your camera in your scene.
- Check the 'HDR' box.
- Open Edit->Project Settings->Quality.
- Ensure 'Anti-aliasing' on the Quality Setting your are using is set to 'none', or HDR will be silently disabled on your camera (ಠ_ಠ THANKS UNITY ಠ_ಠ).
- Go to Window->Alloy->Light Migrator and wait for it to finish updating your scene's existing lights.
- Now save your scene.
To use the Skin, SpeedTree, and/or Transmission shaders in deferred mode, you MUST do the following:
- Open Edit->Project Settings->Graphics.
- Set the 'Deferred' setting to 'Custom shader'.
- Open the picker below, and select either the 'Alloy Deferred Skin' or 'Alloy Deferred Transmission' shader based on your performance requirements.
- 'Alloy Deferred Transmission' covers the SpeedTree and Transmission shaders.
- 'Alloy Deferred Skin' covers the Skin, SpeedTree, and Transmission shaders.
- Go to the "Hierarchy" tab, and select your camera.
- Add the component "Alloy/Alloy Effects Manager".
- Add or remove the "Skin Scattering" and/or "Transmission" tabs to reduce cost.
- Set your materials to the "Alloy/Human/Skin" or "Alloy/Transmission/*" shaders.
- Go to Window->Alloy->Documentation.
- Change windows to the newly opened browser tab.
Now you're ready to play!