add define

This commit is contained in:
Hubert Mattusch 2023-06-12 19:33:57 +02:00
parent f837aec845
commit 34807988d8
2 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ namespace NEG.UI.UnityUi
/// <para>You have to provide prefabs within resources:</para>
/// <para> - UI/PopupCanvas - prefab with canvas to create popups (will be created on every scene)</para>
/// <para> - UI/DefaultPopupPrefab - prefab of default popup with 2 options (has to have <see cref="MonoDefaultPopup"/> component)</para>
/// NEG_UI_DISABLE_WARNING_DEFAULT_SELECTION
/// </summary>
public class MonoUiManager : UiManager, IDisposable
{

View File

@ -58,8 +58,10 @@ namespace NEG.UI.UnityUi.Window
{
if (controller == null)
controller = GetComponent<WindowController>();
#if !NEG_UI_DISABLE_WARNING_DEFAULT_SELECTION
if(defaultSelectedItem == null)
Debug.LogWarning($"Window {name} should have default selected item set");
#endif
}
public void OpenWindow(IWindow window, object data = null)