- Home /
How to use Editor script?
Heading
Heading> HeadingHeading
##
Hi all Unities,
Hey sorry I cannot understand for how to use the "Editor script" when I try to add it to an object it return a message saying "To attach a script it needs to be outside the 'Editor' folder" so how should I make this work? These example are source from AngryAnt, Itween I wondering how could I use these? Could any one please show me the way?
Thanks all.BlockquoteHeading
Please don't format your question as code, except where it is code.
I am sorry I see a box then I just type in but how should I not?
There is a button like 0110 or something. Don't hit that. It will format the current text selection as code. You can edit your post to clean that up if you like.
I did not hit that or any button at all, look I did some thing weird oh I don't know how is this work.....
Answer by DaveA · Jan 19, 2011 at 03:51 PM
You don't add it to an object. Create a folder called Editor in your Assets folder, and put editor scripts in there. If they compile, their UI will auto-incorporate to the editor's UI
will auto-incorporate to the editor's UI??
what exactly does this mean, I'm trying and nothing happens, I have made a cool something and want to add a component to it which will have all the documentation it needs.
He means it should show up in the user interface in unity automatically, assu$$anonymous$$g the code is correct.
I agree with this issue. I have tried many times to get editor scripts to work. I have followed several tutorials and the documentation leaves you assu$$anonymous$$g you actually know how to make the cool little thing show up in the inspector. The script is in a folder "../Assets/Editor/$$anonymous$$yWindow.cs" and it shows no errors in Visual Studio but I cannot for the life of me ever get it to show up ANYWHERE!
Thanks for a response.
Here's an in-depth article on custom editor/inspector basics. http://naplandgames.com/blog/2016/08/27/unity-3d-tutorial-custom-transform-inspector/ Hopefully it will help.
Go to the menu item at the top called 'Window', there you will find a button '$$anonymous$$yWindow' (or however you called it), if your script compiles and it's in "../Assets/Editor". Click on it to open your custom window.
Answer by ludzeller · Jan 20, 2017 at 10:53 AM
Check for the line that sets the place in the menu, so that you know where to look for, e.g.
[MenuItem ("GameObject/Set Pivot")]
Answer by VisualTuber · Jun 03, 2017 at 11:36 AM
@BSVALVE Make an empty game object -> add component -> script -> e.g Menu Controller (what mine said)
Editor scripts are not components. Components are runtime scripts which need to be attached to objects in your scene.
Your answer
![](https://koobas.hobune.stream/wayback/20220613100134im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Itween rotation help 0 Answers
A node in a childnode? 1 Answer
iTween(JS version) could not be used in Unity iPhone? 3 Answers
Unity Script Editor Not Working 1 Answer
Scripting a "Unity Editor"-like object transformation control 1 Answer