I am trying to use this code from robert (Unity) to set the size of the maps in the Lighmapper (Beast):
using UnityEditor;
public class MaxAtlasSize : EditorWindow
{
int[ ] kSizeValues = { 512, 1024, 2048, 4096 };
string[ ] kSizeStrings = { “512”, “1024”, “2048”, “4096” };
void OnGUI()
{
LightmapEditorSettings.maxAtlasHeight = EditorGUILayout.IntPopup(“Max Atlas Size”, LightmapEditorSettings.maxAtlasHeight, kSizeStrings, kSizeValues);
LightmapEditorSettings.maxAtlasWidth = LightmapEditorSettings.maxAtlasHeight;
}
[MenuItem(“Utilities/Max Atlas Size”)]
static void Init()
{
EditorWindow window = EditorWindow.GetWindow(typeof(MaxAtlasSize));
window.Show();
}
}
But it doesn’t work. I want to use maps smaller than 1024.
The case is that code shows the “Utilities/Max Atlas Size” menu item in the Editor but not the size values and I can’t set the different map sizes.
Of course I have placed the script in the Editor folder of my project.
Any idea?