klepto2 Posted July 23 Share Posted July 23 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: Create a script which adds the functionality to the editor 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: 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 2 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Recommended Posts
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.