방법뿐인가?
그냥 매터리얼의 albedo만 못바꾸나?
GetComponent<Renderer>().material.mainTexture = Resources.Load("텍스쳐경로와이름") as Texture;
이렇게 해도 되는데 이럼 배칭이 풀려버린다고 함 그래서...
MaterialPropertyBlock mpb = new MaterialPropertyBlock();
mpb.SetTexture("_MainTex", Resources.Load("텍스쳐경로와이름") as Texture);
GetComponent<Renderer>().SetPropertyBlock(mpb);
요렇게 하면 된다고 함 원상태로 되돌릴땐 GetComponent<Renderer>().SetPropertyBlock(null); 하면 다시 배칭상태로 돌아가나봄... 나도 얼마전에 필요해서 찾아봤던거라 잘 모름
오호 해보지는 못했지만 감사함.. 있다가 해봐야겠다..
GetComponent<Renderer>().material.mainTexture = Resources.Load("텍스쳐경로와이름") as Texture;
이렇게 해도 되는데 이럼 배칭이 풀려버린다고 함 그래서...
MaterialPropertyBlock mpb = new MaterialPropertyBlock();
mpb.SetTexture("_MainTex", Resources.Load("텍스쳐경로와이름") as Texture);
GetComponent<Renderer>().SetPropertyBlock(mpb);
요렇게 하면 된다고 함 원상태로 되돌릴땐 GetComponent<Renderer>().SetPropertyBlock(null); 하면 다시 배칭상태로 돌아가나봄... 나도 얼마전에 필요해서 찾아봤던거라 잘 모름
오호 해보지는 못했지만 감사함.. 있다가 해봐야겠다..