Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Substance caching behavior

Discussion in 'Scripting' started by hausmaus, Jan 25, 2017.

  1. hausmaus

    hausmaus

    Joined:
    Dec 9, 2011
    Posts:
    105
    Does the ProceduralMaterial.loadingBehavior value affect the behavior of Substances that are referenced as SubstanceArchive objects on a custom MonoBehavior?

    I have a customized Standard shader with blending and other things that I am using with static Substance textures. I have a class with a custom inspector that allows me to drag a SubstanceArchive or ProceduralMaterial into a layer slot and quickly populate that layer with the map/channel layout in the Substance. I realize this is forgoing the dynamic nature of Substance, but I'm really just interested in using Designer for everything because it's my favorite program ever, and also in being able to use stuff from Substance Source very quickly for prototyping.

    At runtime, this class has a reference to the SubstanceArchive, but the only things attached to the material or renderer are the generated textures. Does the load/cache behavior of that SubstanceArchive change anything? It seems like it might if Unity only cares if it's in the scene, but not if Unity is checking also to see if it's required by a material.

    Thanks for any insight,
    Adrian
     
  2. hausmaus

    hausmaus

    Joined:
    Dec 9, 2011
    Posts:
    105
    Has anybody had any experience with this? The paranoia is real.