Advertisement
Bunny83

DADTestWindowB

Sep 20th, 2020 (edited)
35
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using UnityEditor;
  3.  
  4. public class DADTestWindowB : EditorWindow
  5. {
  6.     [MenuItem("Tools/Tests/WinB")]
  7.     static void Init()
  8.     {
  9.         CreateInstance<DADTestWindowB>().Show();
  10.     }
  11.  
  12.     DragContainer container;
  13.     private void OnEnable()
  14.     {
  15.         container = new DragContainer();
  16.         new DragObj { title = "TestObj1B", owner = container }.MoveTo(container);
  17.         new DragObj { title = "TestObj2B", owner = container }.MoveTo(container);
  18.         new DragObj { title = "TestObj3B", owner = container }.MoveTo(container);
  19.     }
  20.  
  21.     void OnGUI()
  22.     {
  23.         container.Draw();
  24.     }
  25. }
  26.  
Advertisement
RAW Paste Data Copied
Advertisement