Search Unity

Unity 2018.3 Add Component Error

Discussion in 'Editor & General Support' started by Ben-BearFish, Feb 8, 2019.

  1. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Everyone at my company hasn't been able to click on the Add Component button in the editor's inspector since we upgraded to Unity 2018.3 in December. I was wondering if anyone else experienced this issue and had any possible solutions?

    It's the same bug as specified in this forum:
    https://forum.unity.com/threads/unity-2018-3-bug-key.599605/

    We seem to be able to Add Components through the top bar dropdown in Unity and through Copy & Pasting components, but otherwise the Add Component button does not work. It throws this exception:
    The Add Component button seems to work when we first open Unity, but once we go into play mode once, the error prevents us from Adding the Components. We've tried every new upgraded version of Unity 2018.3, but the error persists. Any suggestions would be appreciated.
     
  2. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    I figured out the issue for anyone else who has the same problem. It looks like Add Component & [AddComponentMenu] are stored in a Dictionary as keys, so the AddComponentMenu, must be unique. One of our devs has this, which was clashing with Unity's built-in key:
    Code (CSharp):
    1. namespace UI.Effects
    2. {
    3.     [AddComponentMenu("UI/Effects/Particle System")]
    4.     sealed public class ParticleSystem : MonoBehaviour
    5.     {
    6.     }
    7. }
    8.  
     
    Jelmer123 likes this.