googlearchive / poly-toolkit-unity

Poly Toolkit for Unity
Apache License 2.0
101 stars 29 forks source link

Can't move PolyToolkit into a Plugins directory #11

Closed Zenopheus closed 6 years ago

Zenopheus commented 6 years ago

Like many Unity projects we store all 3rd party assets in a sub directory under the "Plugins" directory to avoid polluting our directory structure and improve build times. When I do this with PolyToolkit it becomes disabled and displays "Your project seems to be using internal Poly Toolkit classes".

iBicha commented 6 years ago

That's not the best practice, Unity has a specific use of the folder "Plugins" https://docs.unity3d.com/Manual/Plugins.html (Unrelated to the issue, which is can't move polytoolkit)

btco commented 6 years ago

PolyToolkit can't be easily moved from Assets/PolyToolkit because there are some hard-coded paths:

These are all addressable. I'll see what I can do!

btco commented 6 years ago

Fixed. Users can now move PolyToolkit to whichever folder they want under Assets.

btco commented 6 years ago

TIP: Some Unity versions have an issue where, after moving Poly Toolkit to a different folder, you will get error messages like this:

Shader error in 'Brush/DiffuseSingleSided': failed to open source file: '../../../Shaders/Include/Brush.cginc' at line 30 (on d3d11)

(and similar)

Restarting Unity does NOT solve it. The solution is to reimport all shaders. This can be done by right-clicking the PolyToolkit folder and selecting Reimport.

Zenopheus commented 6 years ago

Thank you!