|
I want a programatically controllable view port within the Unity Editor. I want mouse and keyboard events too... I am working on a project that involves click & drag work to create many game objects. I want my puzzle editor to be integrated into the Unity Editor, so that I can take full advantage of its features. I scoured the documentation up and down, but was unable to find useful information about producing a custom 3d view port within the editor. I did find some functions that rendered objects, but failed to do any depth buffering. At present, I am using an autohotkey script to capture mouse movement and feeding it into an editor script. That editor script hijacks a camera from an [undocumented] SceneView object, to do what I want.
(comments are locked)
|
|
Sounds to me like you're working too hard against the flow. Unity is a highly extensible editor, but you seem to be trying to replace rather than extend. Check out Handles and Editor.OnSceneGUI, you'll see it's possible to create pretty powerful custom object editing, without trying to subjugate existing editor functionality. BTW, specifically for controlling the viewport, there are Related Question which answer that.. I do intend to replace some of the editor's functionality. I think that is part of the idea behind making the editor scriptable... The Unity editor is great for placing individual objects and modifying their properties. It doesn't seem so good for placing many objects with a fairly uniform set of properties (with some procedural geometry). All I need is a box in the Editor that renders my scene (defined by a standard Camera) and mouse & key events from that box while focused.
Sep 04 '11 at 07:01 AM
Eketek
I'm guessing you intended to comment on my answer, not add a second answer.
Sep 04 '11 at 11:44 AM
Waz
I would suggest looking at how to extend the editor, and first mastering that. I might be wrong, but it looks like this is the first thing you want to do with Unity, without mastering the basics first. Then try it again yourself, and then when you still have some problems ask more specific en smaller question.
Sep 04 '11 at 11:52 AM
The Oddler
Yes, extending, not replacing, is the well-supported norm. Maybe Unity is wrong there, but I've not seen any problem yet.
Sep 04 '11 at 12:09 PM
Waz
(comments are locked)
|
