Unity Assetbundle shader(丢失)不正确显示的问题

xiaoxiao2021-02-28  8

//修正shader不正确的问题 public void ShaderRecover(GameObject obj) { Renderer[] meshSkinRenderer = obj.GetComponentsInChildren<Renderer>(); for (int i = 0; i < meshSkinRenderer.Length; i++) { meshSkinRenderer[i].material.shader = Shader.Find(meshSkinRenderer[i].material.shader.name); } }
转载请注明原文地址: https://www.6miu.com/read-450276.html

最新回复(0)