Search Unity

Cache server - cant edit materials?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Prodigga, May 6, 2015.

  1. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    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:
    1,123
    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.
     
    iSinner likes this.
  4. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    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".