Skip to content

Antares Universe : SceneView addons API

A easy way to create any your editor plugins

Antares Universe : SceneView addons API

Postby Neodrop » 10 May 2011, 10:16

Available in Universe sence 1.17

This is a simple demo of new Universe SceneView Addon API
Even non-programmers can now create their own addons in Unity Editor with our easy and clear API (which contains only 4 variables and 6 methods in base class). This is a fast and handy way to extend your possibilities in Unity Editor.

Don't want to use our Universe as visual code editor? No problem. You can use it for free - for example just for creating smart and convenient editor tools for your work and remove our Universe from project folder right before final build!
Take it for FREE now!

http://www.youtube.com/watch?v=vKRmDDO8 ... r_embedded



Antares Universe SceneView API contains just 4 variables and 6 methods, but you can use less then that and be still productive.
The detailed description will be published after Universe 1.17 release.

Here you can see a sample class from addon which can unparent all selected objects in one click.


Syntax:
Using csharp Syntax Highlighting
public class AntaresAddonToUniverse_Unparrent : AddonWindow
    {
        public override void Awake()
        {
            //The tab name where your addon will appear
            addonTabName = "Transform";
            // addons button content
            buttonContent = new GUIContent("Unparent", "Unparent selected object");
            // button width
            buttonWidth = 80;
        }

        private Transform transform;
        // Called before drawing the addon button. Can be used for deacticate addon button for example
        public override void OnPreDrawAddonButton()
        {
            transform = Selection.activeTransform;
            GUI.enabled = transform && transform.parent;
        }
       
        // Called when addon button is pressed in Addons Inspector floating window
        public override void OnAddonButtonPressed()
        {
            if (Selection.transforms == null || Selection.transforms.Length == 0)
                return;
            Undo.RegisterSceneUndo(string.Format("Unparent {0} objects", Selection.transforms.Length));
            foreach (var tr in Selection.transforms)
            {
                tr.parent = null;
            }
            // Just show notification. Optional.
            ShowNotificationWithUniverseLogo("Unparented");
        }
    }
Parsed in 0.011 seconds, using GeSHi 1.0.8.4
User avatar
Neodrop
Администратор
 
Posts: 1068
Joined: 15 Jan 2011, 13:18

Re: Antares Universe : SceneView addons API

Postby Neodrop » 12 May 2011, 09:54

Well, visual editor scripting is ready to your imagination and ideas!
All public and internal Unity Editor classes are easy accessible by our Wizards.

Image
User avatar
Neodrop
Администратор
 
Posts: 1068
Joined: 15 Jan 2011, 13:18

Re: Antares Universe : SceneView addons API

Postby Neodrop » 14 May 2011, 20:47

Image
User avatar
Neodrop
Администратор
 
Posts: 1068
Joined: 15 Jan 2011, 13:18

Re: Antares Universe : SceneView addons API

Postby Neodrop » 14 May 2011, 21:24

You can find an example of visual addon in VIZIO/Plugins/VisualAddons folder. Just create you graph, save it in a prefab and place this prefab inside VIZIO folder (or in any subfolder, if needed). After that, you can delete the source graph object from scene. All will work without graph instances in your scene.

To create Editor plugin by our API, read the short API description from .PDF file (in VIZIO/Plugins folder). Write your code and save it anywhere you want inside your project. I recommend saving it in any folder which has "Editor" in its name.
Here is a simple addon, created by our API :

Syntax:
Using csharp Syntax Highlighting
public class Unparrent_AntaresAddonToUniverse : AddonWindow
    {
        public override void Awake()
        {
            addonTabName = "Transform";
            buttonContent = new GUIContent("Unparent", "Unparent selected object");
            buttonWidth = 80;
        }

        private Transform transform;
        public override void OnPreDrawAddonButton()
        {
            transform = Selection.activeTransform;
            GUI.enabled = transform && transform.parent;
        }

        public override void OnAddonButtonPressed()
        {
            if (Selection.transforms == null || Selection.transforms.Length == 0)
                return;
            Undo.RegisterSceneUndo(string.Format("Unparent {0} objects", Selection.transforms.Length));
            transform.DetachChildren();
            ShowNotificationWithUniverseLogo("Unparented");
        }
    }
 
Parsed in 0.009 seconds, using GeSHi 1.0.8.4
User avatar
Neodrop
Администратор
 
Posts: 1068
Joined: 15 Jan 2011, 13:18

Re: Antares Universe : SceneView addons API

Postby Neodrop » 14 May 2011, 22:01

Here is a screenshot of the full-visual plugin. This addon will rename all selected objects :

http://www.forum.antares-universe.com/T ... lected.png

Image
User avatar
Neodrop
Администратор
 
Posts: 1068
Joined: 15 Jan 2011, 13:18

Re: Antares Universe : SceneView addons API

Postby RydnevJe » 23 Aug 2015, 22:39

A great exchange of information.
RydnevJe
 
Posts: 15
Joined: 23 Aug 2015, 22:23


Return to Universe SceneView addon

Who is online

Registered users: No registered users