- Home /
Continuously Create Tiles in OnSceneGUI
Right now I'm following a tutorial on how to create a tile editor using this webpage: http://www.yudiz.com/making-a-basic-2d-tile-map-editor-using-a-custom-inspector/
My code looks near enough similar, but with tweaks in places and many more to come but right now I've come up against an issue with the base line code. When I click in the Scene View to instantiate a tile, the tile is created and the object created is set as the active item, so the view get's screwed up immediately and the inspector changes to the tile, instead of saying on the original gameobject where the tilescript is attached.
I THOUGHT that the line "EditorWindow.FocusWindowIfItsOpen();" in the tutorial would fix this, it doesn't as I realise it's in the wrong place and also that requires a parameter.
So how do I create a multiple tiles without the editor changing the active window and therefore stopping me from clicking 50 times to create objects? I can't have a tile manager where I create 1 tile at a time!
P.S. Whilst I'm at it, does anyone have a similar tutorial for custom brushes that act in the same way, or is it just more or less the same at this point?
Your answer

Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Instantiating a serializable class and variable 1 Answer
OnTriggerEnter() not working 1 Answer