Jump to content

Editor Scripting: Ideas and missing commands (for adding extra functionality)


klepto2
 Share

Recommended Posts

Hi, 

I am currently experimenting with the Editor scripting capabilities and had an idea how to add simple additional items like in this case a simple animated water plane. The idea is the following: 

  1.  Create a script which adds the functionality to the editor
  2.  Add a component which is added to the GameObject in the editor which replicates the behaviour done in the editor script and is executed, when the map is actually loaded

The prove of concept already works fine: 

image.thumb.png.c6716e3242e46f85255f2ff33e15eb47.png

But while implementing the idea i found some missing commands which might be useful:

  • Detailed access to the editor cameras (most important the one from the perspective view)
    • I guess the easiest way would be to expose more functionality from the viewpanel and viewport classes
  • Ability to remove Gameobjects after they are created
    • Currently there is only CreateGameObject, but no RemoveGameObject (or DeleteGameObject)
  • CreateGameObject only adds the object to the root
    • An optional group parameter or path would be a nice to have
  • GameObject in general
    • Ability to add custom properties or groups like Phyiscs
    • Remove default edit groups, eg some extensions don't need Physics or Appeareance settings
    • Ability to draw custom gizmos
    • Add custom icons
    • Ability to trigger an event, when a scene is loaded with the specific gameobject (maybe a type identifier for the gameobject musbe added)
  • General:
    • More access to the underlying Editor classes
      • Currently only a few methods are available and sometimes just the class but nothing else is exposed via lua.
    • More documentation on the editor plugin development (maybe some simple how tos)
    • The scripts you have already created are already a nice starting point, but more in depth samples would be nice
    • Some helper functions would be nice as well
      • Instead of this:
        • extension.game_object:SetSelected(true)
                      extension.game_object:SetName("water_plane")
                      program.sidepanel:SelectItem(2)
                      EmitEvent(EVENT_WIDGETSELECT, program.sidepanel, 2)
      • Maybe something like this: 
        • NavigateToSceneBrowser, NavigateToAssetBrowser

 

 

 

  • Upvote 2
  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...