UniversalAdditionalLightDataEditor.cs 808 B

1234567891011121314151617181920212223
  1. using UnityEngine.Rendering.Universal;
  2. using UnityEngine.Scripting.APIUpdating;
  3. namespace UnityEditor.Rendering.Universal
  4. {
  5. [CanEditMultipleObjects]
  6. [CustomEditor(typeof(UniversalAdditionalLightData))]
  7. [MovedFrom("UnityEditor.Rendering.LWRP")] public class UniversalAdditionLightDataEditor : Editor
  8. {
  9. public override void OnInspectorGUI()
  10. {
  11. }
  12. [MenuItem("CONTEXT/LWRPAdditionalLightData/Remove Component")]
  13. static void RemoveComponent(MenuCommand command)
  14. {
  15. if (EditorUtility.DisplayDialog("Remove Component?", "Are you sure you want to remove this component? If you do, you will lose some settings.", "Remove", "Cancel"))
  16. {
  17. Undo.DestroyObjectImmediate(command.context);
  18. }
  19. }
  20. }
  21. }