Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Generate Lightmap UVs for Editor Combined Mesh

Discussion in 'Global Illumination' started by keninger, Sep 13, 2017.

  1. keninger

    keninger

    Joined:
    Mar 29, 2014
    Posts:
    15
    Hi,

    I have combined meshes in the editor, and the plugin itself did not regenerate lightmap uvs like I could if I just imported the mesh. How can I generate the lightmap UVs in this case?
     
    Rotecks likes this.
  2. Rotecks

    Rotecks

    Joined:
    Dec 17, 2014
    Posts:
    51
    Hey! Did you find solution? I have the same problem :(
     
  3. Kuba

    Kuba

    Unity Technologies

    Joined:
    Jan 13, 2009
    Posts:
    395
  4. Rotecks

    Rotecks

    Joined:
    Dec 17, 2014
    Posts:
    51
    Thank you! It works!
    But sometimes for some meshes I get such error :

    UnityException: You can generate UVs only for meshes with vertices inited.
    UnityEditor.Unwrapping.GeneratePerTriangleUVImpl (UnityEngine.Mesh src, UnwrapParam settings)
    UnityEditor.Unwrapping.GeneratePerTriangleUV (UnityEngine.Mesh src, UnwrapParam settings) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Unwrapping.bindings.cs:43)
    UnityEditor.Unwrapping.GeneratePerTriangleUV (UnityEngine.Mesh src) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Unwrapping.bindings.cs:37)
    UnityEditor.Unwrapping.GenerateSecondaryUVSet (UnityEngine.Mesh src) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Unwrapping.bindings.cs:52)
    StairRailing_Corrector.meshBacker () (at Assets/Units/Rooms/Part_2/Bridge/Scripts/StairRailing_Corrector.cs:330)
    StairRailing_Corrector.UpdateColliders_And_Mesh () (at Assets/Units/Rooms/Part_2/Bridge/Scripts/StairRailing_Corrector.cs:188)
    Bridge_Corrector_Abstract.SaveMeshAsAsset () (at Assets/Units/Rooms/Part_2/Bridge/Scripts/Abstract/Bridge_Corrector_Abstract.cs:73)
    Bridge_Corrector_Abstract_Editor.DrawButtons () (at Assets/Units/Rooms/Part_2/Bridge/Editor/Scripts/Abstract/Bridge_Corrector_Abstract_Editor.cs:12)
    StairRailing_Corrector_GUI_Editor.OnInspectorGUI () (at Assets/Units/Rooms/Part_2/Bridge/Editor/Scripts/StairRailing_Corrector_GUI_Editor.cs:29)
    UnityEditor.InspectorWindow.DoOnInspectorGUI (Boolean rebuildOptimizedGUIBlock, UnityEditor.Editor editor, Boolean wasVisible, UnityEngine.Rect& contentRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1625)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Do you know the reason???