https://docs.unity3d.com/ScriptReference/TextureImporter.html
Unity - Scripting API: TextureImporter
Success! Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable. Close
docs.unity3d.com
https://forum.unity.com/threads/change-the-texture-shape-via-script.471261/
Change the texture shape via script ?
Hey there ! I'm making an Editor script in order to tranfsorm my textures into Cubemap materials, I'm ok with it excepted for the texture shape that...
forum.unity.com
```
- // Getting textures
- var textures = Selection.GetFiltered(typeof(Texture), SelectionMode.Assets).Cast<Texture>();
- foreach (var tex in textures)
- {
- // Texture path
- string path = AssetDatabase.GetAssetPath(tex);
- // If the texture dimensions is not "Cube", we convert it
- TextureImporter importer = (TextureImporter)TextureImporter.GetAtPath(path);
- if (tex.dimension != UnityEngine.Rendering.TextureDimension.Cube)
- {
- importer.textureShape = TextureImporterShape.TextureCube;
- importer.SaveAndReimport();
- }
- }
```
https://docs.unity3d.com/Manual/class-Cubemap.html
Unity - Manual: Cubemaps
Cubemaps Switch to Scripting A Cubemap is a collection of six square textures that represent the reflections on an environment. The six squares form the faces of an imaginary cube that surrounds an object; each face represents the view along the directions
docs.unity3d.com
https://docs.unity3d.com/ScriptReference/Cubemap.html
Unity - Scripting API: Cubemap
Success! Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable. Close
docs.unity3d.com
'tech > metaverse' 카테고리의 다른 글
21/09/11 Interaction Feature (0) | 2021.09.11 |
---|---|
21/09/11 Camera Zoom in Unity - C# (0) | 2021.09.11 |
21/09/10 위지윅스튜디오, 자회사 엔피와 'XR 언택트 콘서트' 성황리 마무리 (0) | 2021.09.10 |
21/09/10 Unity get texture image from remote url (0) | 2021.09.10 |
21/09/10 상상이 현실로, VR, AR, MR, XR, SR 뭐가 다를까 (0) | 2021.09.10 |