1
Support / Prefab/Material problem
« on: January 07, 2013, 07:13:28 pm »
I'm trying to make 2 prefabs for each of my sprites, one that is affected by fog and one that isn't. So I duplicated the material of my sprite collection and assigned a shader that has fog enabled (set to mode global) Then I duplicated a prefab (made from a 2dtk sprite) in my scene, renamed it, and chose Game Object > break prefab instance. then I replaced the material with the fog enabled material on that game object. And then I dragged that into my project tab to make it a new prefab. So all looks well in my project tab, I have a prefab with the original material and a prefab with my fog enabled material. But, when I drag the fog enabled prefab into the scene, it reverts back to having the original material!! I tried this same procedure with a cube and this issue did not occur, so I am guessing it is related to 2dtk. Any thoughts? Also it seems I can work around the problem by reverting to prefab value, but it is still a bit annoying. Hoping I am just doing something wrong here.
Update: Actually the workaround doesn't help, when i start the game it changes back to the original material.
Update: Actually the workaround doesn't help, when i start the game it changes back to the original material.