Search Unity

CustomEditor: StackOverflowException occurs in the Version RC1

Discussion in 'UGUI & TextMesh Pro' started by Sander1991, Nov 13, 2014.

  1. Sander1991

    Sander1991

    Joined:
    Aug 25, 2014
    Posts:
    162
    Hello,

    since the new 4.6 RC1 I get a StackOverflowException and this brings my Unity getting hardcrashed. The error references on this code:

    Code (CSharp):
    1. [MenuItem("Master System/Create Inventory")]        
    2.     public static void menuItemCreateInventory()      
    3.     {
    4.         GameObject inventory = new GameObject();
    5.         inventory.name = "Inventory";
    6.         inventory.AddComponent<Inventory>().createCanvasWithPanel(inventory);
    7.     }
    The error occurs by this code: inventory.AddComponent<Inventory>().createCanvasWithPanel(inventory);

    Actually I allready took it out and created a empty GameObject on my own and added the Inventory Script by hand. This gives a stackOverFlow aswell. The Inventory Script is attached to a CustomEditor so I guess there is the problem. Something with the Custom Editor....