Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Cache server - cant edit materials?

Discussion in 'Extensions & OnGUI' started by Prodigga, May 6, 2015.

  1. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    544
    http://docs.unity3d.com/Manual/CacheServer.html

    We were considering deploying a cache server to improve import times.. however, the manual page says that we shouldn't edit materials in the project after they have been created?

    How can this be so? Sounds like a huge issue and it sounds like it would make cache server completely useless. Am I misunderstanding something.

    This means that work can be lost between computers when materials in the project are modified. Again, sounds completely unacceptable? But maybe it's not as big of an issue as it sounds like it would be?

    Anyone have any idea how it works? Can we just make it ignore material files?
     
  2. HotBergamot

    HotBergamot

    Joined:
    Jan 6, 2015
    Posts:
    1
    Also curious about this. I've tried to force this issue to happen locally but I cannot. Under what exact circumstances will Unity pull in a stale material from the Cache Server?
     
  3. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    544
    Last week our office had lunch with a unity evangelist (Patrick Bell). I raised this question with him and he came back with an answer by pointing me to this old (yet still valid) blog post.

    More specifically:

    TL;DR just avoid modifying your materials through an AssetPostprocessor and you will be fine, because the AssetPostprocessor won't run when your assets are imported through the cache (which is the point).

    The Cache Server docs mention "It is best to never modify materials that already exist on disk." which seems to be misleading because all its trying to say is don't modify material on disk directly via a postprocessing script. It seems the docs have not yet been (or will ever be?) updated to make this more clear.
     
  4. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    48
    The documentation is still unclear 3 years later. Thanks for posting these remarks; we're also looking into using the Cache Server and I stumbled upon that line "It is best to never modify materials that already exist on disk".