예제 #1
0
        public static void ShowWindow(Rect buttonRect, Type type, AddObjectWindow.AddCallbackDelegate addCallback, AddObjectWindow.CreateCallbackDelegate createCallback)
        {
            AddObjectWindow window = ScriptableObject.CreateInstance <AddObjectWindow>();

            buttonRect              = GUIToScreenRect(buttonRect);
            window.m_Type           = type;
            window.onAddCallback    = addCallback;
            window.onCreateCallback = createCallback;
            window.ShowAsDropDown(buttonRect, new Vector2(buttonRect.width, 280f));
        }
예제 #2
0
 public static void ShowWindow <T>(Rect buttonRect, AddObjectWindow.AddCallbackDelegate addCallback, AddObjectWindow.CreateCallbackDelegate createCallback)
 {
     ShowWindow(buttonRect, typeof(T), addCallback, createCallback);
 }