Exemple #1
0
        protected override void RowGUI(RowGUIArgs args)
        {
            if (args.item.displayName == "ROOT")
            {
                base.RowGUI(args);
                return;
            }
            var contentIndent = GetContentIndent(args.item);

            var labelRect = args.rowRect;

            labelRect.x += contentIndent;
            EditorGUI.LabelField(labelRect, args.label);

            var buttonRect = args.rowRect;

            buttonRect.x    += args.rowRect.width - 100;
            buttonRect.width = 100;
            if (GUI.Button(buttonRect, "Attach GO"))
            {
                parentObject.AttachGameObjectToNode((uint)args.item.id);
            }
        }