admin管理员组文章数量:1122832
I am importing a Texture 2D component in my Player Controller script. I would like to know how I can change the value of the imported Texture 2D inside Player Controller.
Texture 2D component
Player Controller Script
I don't know if this is possible, didn't find it in the Unity documentation.
I am importing a Texture 2D component in my Player Controller script. I would like to know how I can change the value of the imported Texture 2D inside Player Controller.
Texture 2D component
Player Controller Script
I don't know if this is possible, didn't find it in the Unity documentation.
Share Improve this question asked yesterday Pedro ViegasPedro Viegas 1 New contributor Pedro Viegas is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 3- Import the texture twice, flip one -> exchange the texture ? – derHugo Commented yesterday
- that's probably what I'll go for since I can't flip it at run time. thank you! – Pedro Viegas Commented yesterday
- Depends a bit what exactly you are trying to achieve by that .. it basically inverts a normal map .. you could probably achieve the same by inverting the values pixel by pixel but then I'd rather have the double of memory usage and do it way faster ^^ – derHugo Commented yesterday
1 Answer
Reset to default 0This is not possible.
The Unity documentation for changing this value can be found at TextureImporter.flipGreenChannel, but TextureImporter
is an editor class which can only be used in editor scripts, so you cannot change this value in runtime.
本文标签:
版权声明:本文标题:unity game engine - How to toggle "Flip Green Channel" value of a Texture 2D component through C#? - Stack Ove 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736283338a1926937.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论