Skip to content

Asset Component Features

Add the asset component like so:

The Add Component search with addallin13D typed, listing the AddAllIn13DShader script above New script

Once added the component will look like this:

The AddAllIn13DShader component with its buttons
  • Deactivate All Effects: Turns every effect off and puts the effects with modes on their first option, so Light Model becomes None. Cast Shadows, Receive Shadows and Alpha Cutoff go off too. Property values stay, but you’ll have to pick the modes and turn the effects back on yourself. It saves your open scenes, and does nothing on a baked shader.
  • New Clean Material: Creates a material from the preset chosen in the Other tab of the Asset Window and assigns it. Properties that share a name with the old material, such as Main Texture and Color, are copied across. On a material that already uses this shader that includes its effects, so you get a separate copy that looks the same rather than an empty material. To turn effects off, use Deactivate All Effects.
  • Save Material To Folder (SEE DOC): Saves the material as an asset so it survives outside the scene. Press this before turning the object into a prefab, see Saving Prefabs. The save folder is set in the Asset Window.
  • Apply Material To All Children: Applies this object’s material to every renderer under it in the hierarchy.
  • Render Material To Image: Renders the material over its Main Texture, which it needs to have, and saves the result as a PNG at four times the texture’s size. It opens a save panel.
  • Remove Component: Removes the component and leaves the material alone.
  • Remove Component and Material: Removes the component and replaces the material with a new Standard one, or Universal Render Pipeline/Lit in URP, copying the properties that share a name. Your previous material is not stored, so it doesn’t come back.

Two more buttons live on the Material Inspector rather than the component: Bake Shader Keywords and Revert To Generic Shader. Those are covered in Full Control Over Shader Keywords.