Ejemplo n.º 1
0
        public static void ToolContextToolbarForTarget(GUIContent content, UObject target)
        {
            if (target == null)
            {
                throw new ArgumentNullException("target");
            }

            if (target is Editor editor)
            {
                EditorToolManager.GetComponentContexts(x => x.inspector == editor, s_CustomEditorContexts);
            }
            else
            {
                EditorToolManager.GetComponentContexts(x => x.target == target, s_CustomEditorContexts);
            }

            ToolContextToolbar(content, s_CustomEditorContexts);

            s_CustomEditorTools.Clear();
        }