https://docs.unity3d.com/ScriptReference/TextureImporter.html
https://forum.unity.com/threads/change-the-texture-shape-via-script.471261/
```
- // 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
https://docs.unity3d.com/ScriptReference/Cubemap.html
'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 |