{"id":25842763,"url":"https://github.com/nir3x/cube-auto-uv-unity","last_synced_at":"2026-04-28T18:03:10.221Z","repository":{"id":229879223,"uuid":"777881561","full_name":"NIR3X/Cube-Auto-UV-Unity","owner":"NIR3X","description":"Cube Auto UV - Automatically adjust UV coordinates for stretched cube meshes","archived":false,"fork":false,"pushed_at":"2024-03-26T17:51:42.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-26T18:50:50.680Z","etag":null,"topics":["3d-modeling","c-sharp","cube-meshes","game-development","gamedev-tools","mesh-scripting","seamless-textures","texture-mapping","texture-repeating","unity","unity-3d","unity-engine","uv-coordinates","uv-mapping"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NIR3X.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-26T17:16:57.000Z","updated_at":"2024-03-26T18:50:58.196Z","dependencies_parsed_at":"2024-03-26T19:01:02.600Z","dependency_job_id":null,"html_url":"https://github.com/NIR3X/Cube-Auto-UV-Unity","commit_stats":null,"previous_names":["nir3x/cube-auto-uv-unity"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NIR3X%2FCube-Auto-UV-Unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NIR3X%2FCube-Auto-UV-Unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NIR3X%2FCube-Auto-UV-Unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NIR3X%2FCube-Auto-UV-Unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NIR3X","download_url":"https://codeload.github.com/NIR3X/Cube-Auto-UV-Unity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241329448,"owners_count":19944982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-modeling","c-sharp","cube-meshes","game-development","gamedev-tools","mesh-scripting","seamless-textures","texture-mapping","texture-repeating","unity","unity-3d","unity-engine","uv-coordinates","uv-mapping"],"created_at":"2025-03-01T06:31:43.507Z","updated_at":"2026-04-28T18:03:05.198Z","avatar_url":"https://github.com/NIR3X.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cube Auto UV - Automatically adjust UV coordinates for stretched cube meshes\n\nCube Auto UV is a C# script for Unity that automatically adjusts the UV coordinates of a cube mesh based on its parent's scale. This feature is particularly useful when working with cubes that are stretched or scaled unevenly, as it ensures that the texture applied to the cube does not become distorted but rather repeats seamlessly.\n\n## How it Works\n\nThe script `CubeAutoUV.cs` extends the `MonoBehaviour` class in Unity. It provides boolean parameters to control which axes (x, y, z) should have their UV coordinates adjusted. By default, all axes are enabled for adjustment.\n\nWhen the `Start()` function is called, the script automatically adjusts the UV coordinates of the cube mesh according to the scale of its parent object. This ensures that the texture remains consistent even when the cube is stretched or scaled.\n\n## Usage\n\n1. Attach the `CubeAutoUV.cs` script to a GameObject in your scene.\n2. Assign the `cube` variable to the GameObject containing the cube mesh.\n3. Optionally, you can control which axes (x, y, z) should have their UV coordinates adjusted by setting the corresponding boolean variables (`xAxis`, `yAxis`, `zAxis`).\n4. Ensure that the material applied to the cube mesh is set up to handle adjusted UV coordinates.\n5. Play the scene or call the `AutoUV()` method to automatically adjust the UV coordinates.\n\n## Example\n\nAn example usage of Cube Auto UV would be creating a long and high wall from a single cube by stretching it without needing to manually adjust UVs.\n\n## License\n\n[![GNU AGPLv3 Image](https://www.gnu.org/graphics/agplv3-155x51.png)](https://www.gnu.org/licenses/agpl-3.0.html)\n\nThis program is Free Software: You can use, study share and improve it at your\nwill. Specifically you can redistribute and/or modify it under the terms of the\n[GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html) as\npublished by the Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnir3x%2Fcube-auto-uv-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnir3x%2Fcube-auto-uv-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnir3x%2Fcube-auto-uv-unity/lists"}