Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Tile palette create error...

Discussion in '2D' started by leegod, Apr 10, 2023.

  1. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,487
    Window-Tile Palette-Create new palette result in following errors.

    How to resolve this and make it function normally?

    --------------------------
    ArgumentException: Unable to set invalid palette
    UnityEditor.Tilemaps.GridPaintingState.set_palette (UnityEngine.GameObject value) (at ./Library/PackageCache/com.unity.2d.tilemap@1.0.0/Editor/GridPaintingState.cs:442)
    UnityEditor.Tilemaps.GridPaletteAddPopup.OnGUI () (at ./Library/PackageCache/com.unity.2d.tilemap@1.0.0/Editor/GridPaletteAddPopup.cs:162)
    UnityEditor.HostView.OldOnGUI () (at <d9db1e7924774af688adb5dbcac728ba>:0)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <ac719161a48c4490938dbb67ee231f63>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <b64cb23f4edb44cd8be6246d47469978>:0)
     
  2. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    This sounds like a bug. Could you file a bug report using the Unity Bug reporter and post the case number here? Also, if you could share the Unity Editor version you are using, that would help!
     
  3. fwsr

    fwsr

    Joined:
    Sep 10, 2022
    Posts:
    1
    I got the same error, version 2022.3.4f1 on mac
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,576
    So you've filed a bug report? If not, please do so otherwise just knowing you have "the same error" won't help to get it resolved.

    Thanks.
     
  5. nvadr

    nvadr

    Joined:
    Jul 12, 2020
    Posts:
    1
    Temporary solution seems to be :

    Create a prefab of your tilemap. This would be called "Grid" in the hierarchy by default.
    Then drag and drop the prefab into the tile palette window.

    Then you should be able to select "Grid" from the Palette selection.
     
  6. MaxWatch

    MaxWatch

    Joined:
    Mar 23, 2023
    Posts:
    2
    Have the same issue here, Unity Editor 2022.3.17f1 .
    The palette does creates in my game's files, but it doesn't get detected and I can't use it, because it sends the same message (Unable to set invalid palette) . PaletteError.png