SetTexture1 유니티 스크립트 - 메터리얼 텍스쳐 정보 사용하기 유니티 스크립트에서는 메터리얼에 담겨 있는 텍스쳐의 다양한 정보를 편집해서 사용할 수 있다. MainTexture는 maintexture / mainTextureOffset / mainTextureScale 등을 활용하여 크기나 좌표를 편집할 수 있고, SubTexture들은 String 값을 참조하여 편집할 수 있다. 아래의 코드를 참고하자. m_Renderer.material.mainTextureOffset = new Vector2(offset.x - ((int)offset.x), offset.y - ((int)offset.y)); m_Renderer.material.SetTextureOffset("_Alpha", offset); //_Alpha 에 담겨 있는 텍스쳐의 좌표를 편집할 수 있다. m_R.. 2016. 7. 27. 이전 1 다음