methusalah / SplineMesh

A Unity plugin to create curved content in real-time with bézier curves
https://twitter.com/dumas181
MIT License
1.05k stars 104 forks source link

Editor code preventing compilation to standalone player #40

Closed LiorBanai closed 3 years ago

LiorBanai commented 3 years ago

the SplineEditor.cs and SplineExtrusionEditor.cs are editor related code that prevent compilation to standalone player.

I have added #if UNITY_EDITOR and #endif and it seems to works. It may be good idea to add it to here also?

methusalah commented 3 years ago

The correct way to do this is to place these files in a folder named Editor. All Editor folders are ignored by Unity upon build.

It's not normal that you have the error. Have you moved the files?

Le mar. 22 déc. 2020 à 18:43, Lior Banai notifications@github.com a écrit :

the SplineEditor.cs and SplineExtrusionEditor.cs are editor related code that prevent compilation to standalone player.

I have added #if UNITY_EDITOR and #endif and it seems to works. It may be good idea to add it to here also?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/benoit-dumas/SplineMesh/issues/40, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5QKTREOUTRWJ22MXHXAN3SWDLEXANCNFSM4VF56FXQ .

LiorBanai commented 3 years ago

I put the code in new Assembly definition and the Editor folder is in "Scripts\Editor" folder. Maybe the Editor folder needs to be top level folder?

methusalah commented 3 years ago

Nope, any Editor folder should be ignored upon build : https://docs.unity3d.com/Manual/SpecialFolders.html

Le mar. 22 déc. 2020 à 20:27, Lior Banai notifications@github.com a écrit :

I put the code in new Assembly definition and the Editor folder is in "Scripts\Editor" folder. Maybe the Editor folder needs to be top level folder?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/benoit-dumas/SplineMesh/issues/40#issuecomment-749731960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5QKTQ2Q2EGX64PK5XJKY3SWDXI3ANCNFSM4VF56FXQ .

LiorBanai commented 3 years ago

Strange. Thanks, I'll investigate it more. Closing this :)