- Home /
Question by
biebuster · Feb 07, 2016 at 02:35 PM ·
layersscene vieweditor extensioneditor scripting
Editor Scripting: change selected objects layer with button press
Hello! In my game, the enverioment can both be on the "wall" layer, and on the "ground" layer. Since i'm obivously gonna have to change this alot, having to do it in the inspector using the mouse would be very slow over time. So i'd like a custom editor script, that let's me take the current selected object and change the layer to some layer i've selected.
Comment
Your answer
Follow this Question
Related Questions
Using A Paused Test Run As Scene 0 Answers
EditorGUI.PrefixLabel got truncated 0 Answers
Play Unity Editor from VSCode? 0 Answers
Using attributes to store data at edit time 1 Answer
Execute code once when a prefab is placed into the scene? 2 Answers