- Home /
Trouble using savepanel and unityeditor namespace in built exe
Hi all, I have read in other questions about this same issue, as far as I understood the moment I use Savepanel I need to use UnityEditor namespace, and this is all fine in the editor, but when I bring this out it just cant build it. I read in several posts related to similar issues that there are 2 solutions to this, one move the scripts to Editor folder/subfolder and the other is include the lines mentioning this inside a " #if UNITY_EDITOR .... #endif" block, however I tried both solutions (full of fears to be honest) and none worked for me, yes I can build the project with either of the solutions propossed but the game is messed and doesnt work when moved to the Editor folder, not even in the editor it works, doing the other way with the check for unity editor it works overal fine inside and outside the editor but the savepanel function doesnt work outside the editor which seems logical as the check for editor gives a false result so its not called, then how can I bring the savepanel to allow the user to save his things? Thanks a lot for any clue regarding this, its a true headache for several hours now.
PS Im using version 5.6.1f1 just in case its all different later on and this can be done without checking for editor or doing anything (which I think would be cool)