Multi-object editing not supported error resolution

error message

resolvent

Add a property [caneditmultipleobjects] before your editor class declaration.

When an editor without this attribute selects multiple objects, it will prompt “multi object editing not supported”, and other drawing errors will not be displayed.

Note: the script file of customeditor must be placed in the assets / editor folder in the project, and using unityeditor; must be added to the reference of the script header file;.

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

[CustomEditor(typeof(TestLightmapsHolder))]
[CanEditMultipleObjects]//add this
public class TestLightmapsHolderEditor : Editor
{
    public override void OnInspectorGUI()
    {
        TestLightmapsHolder holder = target as TestLightmapsHolder;
        base.OnInspectorGUI();
        if (GUILayout.Button("Save light mapping"))
            holder.SaveLightmaps();
    }
}

Read More: