UVViewer visualizes unwrapped UV map in Unity 5.4+.
You could use this .unitypackage or clone this project and copy UVViewer plugin assets in folder Assets/Plugins to your project. When installed, you could open the UV Viewer Window from the menu bar Window > UV Viewer.
Just select a mesh, and it's UV will be displayed in the UV Viewer Window. If the selected object has a MeshFilter component, the mesh will be recognized too.
In the UV Viewer window, there are settings for Mesh too. If you change the Mesh loading mode from Selected Object
to Custom
, you could load a specific mesh.
Default texture mode is None
.
If you change to Custom
, you could load any texture and draw it below the UV map.
You could set custom mesh and texture from Editor script as well:
using Macaron.UVViewer.Editor;
class EditorClass
{
void SetCustom(Mesh mesh, Texture texture)
{
UVViewerWindow.ShowWindow().SetCustomMesh(mesh);
UVViewerWindow.ShowWindow().SetCustomTexture(texture);
}
}
-
The UV, mesh and texture is loaded once. If you change something outside of the UV Viewer Window, you'll need to click the button
Reload
to reflect the changes. -
For machines which Geometry shader is unsupported,
Line Thickness
and other options are disabled.