Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by inejwstine · May 10, 2018 at 09:39 PM · editorcustom editoreditor window

How to include a custom editor in every project?

Hi there. I created a simple custom editor script. It's not project specific; it's something that could be useful no matter what project I'm in. Currently if I want it to be available in the project I'm working on, I need to manually copy the script to the project's editor folder. Is there some kind of "global" editor folder I can move the script to so it will always be there no matter what project I'm in?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Vicarian · May 10, 2018 at 10:00 PM 0
Share

You can save yourself the step of using File Explorer to copy the script around by making the script a package that you can import directly from Unity. It will preserve any folder structure you've created to store the file. Unity tends to remember locations you searched previously, so it should save a bit of time. I'm unaware if you can actually include the script as you want.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by justDeek · May 11, 2018 at 02:42 PM

I have a similar setup, where I have a folder called "_SharedAssets" next to my Unity projects, that contains all the scripts and sprites that are basic enough to be useful in several projects. For that I create a directory hard-link from that _SharedAssets folder to an equally named empty folder in each Assets folder (either by console or you search for SymlinkCreator, at least if you're on Windows, which is a neat little GUI for creating symbolic links; it also doesn't matter if it has the same folder-name, but it keeps things organized).


With that you can also decide, which project should contain this folder (you need to create a hard-link for every project, that's why I suggest you to use the SymlinkCreator program) or have different folders for different projects and only link the folders you need depending on the project.


Short explanation: Symbolic links are like a reference to a folder and its content (like a link) and a directory hard-link accesses the same memory of the same content in different folders, which means that the system sees both folders as individually having the same content, but if you delete something in one of them, then it also removes it from the other folder (though I think deleting one of the folders doesn't remove the content as long as there's the other folder with that content | there are also two versions for both files and folders, so you should read up on that matter in general).


It's important that it's a hard-link because otherwise Unity doesn't use that folders content as if it would be directly in the Assets folder. If you've never used symbolic links before, you should be careful, what you enter as the source and what as the destination, since it could lead to one folder overwriting the wrong one, resulting in dataloss (that's why you should back up your files beforehand in case you're worried).


It all sounds harder than it is and will make your life a bit easier to know this sort of approach. I also haven't encountered any problems of using hard-links in Unity yet. If you create backups of your projects by copy-pasting for example, you should also note that the Assets/_SharedAssets folder of the backup will be empty, so you also need to backup the _SharedAssets folder directly, to also save the files in those folders.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

113 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Custom editor array without serialized object 2 Answers

UnityEventBase editor changed callback 0 Answers

Different approach to loading XML data 1 Answer

EditorWindow.OnSelectionChange() in scene view? 1 Answer

Reset or Reinstantiate Custom Editors Target(s) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges