- Home /
How should I make the folder structure when I create a plugin for Unity
I am creating a rogue-like game specific high-level visual programming asset for my thesis. So I started to build a node editor. Node editor works, however, I read that I can't reach the code inside the Editor
folder during the runtime. So I decided to create 2 graphs. One for manipulating nodes inside the editor, and the other one for the runtime.
So I kind of confused how to make my folder structure. Here is my current structure.
Assets
+My-Framework
+Editor
+Common
+UI
+Utils
+Resources
+Data
+Fonts
+Graphics
Currently, my graph-related classes are all in the Common
folder but, since it is inside the Editor folder, all these classes will be discarded in runtime or build. Thus, I won't get any benefit of those classes.
So I know that I should move those classes outside of the Editor
folder.
I am also using some images from the Graphics folder in the Editor UI. So these images won't be necessary during the runtime but these are involving to the build as well. So those images should be inside the Editor
folder.
This is confusing to me and I don't want to move further without making it clean.
What I am asking is; how should I keep my folder structure to make it as clean as possible?
Answer by Adam-Mechtley · Feb 27, 2017 at 03:26 PM
There are a lot of details about how the folder structure impacts the build, so you might find this thread in the forum to be a helpful starting point. Other than that, I wouldn't get too far hung up on folder structure "cleanliness", in part because what makes sense for your tool will likely emerge as you flesh it out more.
That's great. Thanks for it. I guess I used wrong keywords while I'm searching.
Your answer
Follow this Question
Related Questions
how to stop reorderable list from passing Event value to the new element 1 Answer
Add prefabs to hierarchy without game running? 1 Answer
Unity 5 editor greyes out in Play Mode 1 Answer
OnStartServer works in editor, not in build 0 Answers
Selecting a newly created empty prefab by an editor script 0 Answers