Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Is there a way to fix "ArgumentException: Unable to set invalid palette"

Discussion in '2D' started by scope28, Oct 22, 2023.

  1. scope28

    scope28

    Joined:
    May 15, 2020
    Posts:
    2
    This comes up when i try to create a new tile palate, i am using the newest version of unity and i've check and everything is up to date. Here it the full thing:

    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:449)
    UnityEditor.Tilemaps.GridPaletteAddPopup.OnGUI () (at ./Library/PackageCache/com.unity.2d.tilemap@1.0.0/Editor/GridPaletteAddPopup.cs:162)
    UnityEditor.HostView.OldOnGUI () (at <9920ff0c944845d7b9f9a61ef1478edc>: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 <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <2a6c2bf2255f4beda040b401cc7fbbeb>:0)
     
  2. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,354
  3. scope28

    scope28

    Joined:
    May 15, 2020
    Posts:
    2
    they said "Then drag and drop the prefab into the tile palette window." but i dont know where abouts to drop it as it doesnt let me drop it into the tile palette window.
     
  4. saiosan

    saiosan

    Joined:
    Jun 23, 2021
    Posts:
    1
    After you created your palette, manually add a sprite renderer component to it.