|
Post by karcfa on Mar 30, 2022 15:13:30 GMT
After going in and out of play mode few times eventually i will get this error when i press Play.
my assumption is it fails to open it because the connection was not closed properly during the last time I used it and exited play mode.
|
|
|
Post by karcfa on Mar 30, 2022 15:51:14 GMT
I checked faq but it didnt help me
this happens when i save scripts during play mode (and thus unity will trigger a script reload or compilation) and "overwrite if exists" is true
if these 2 are conditions are met, im gonna get this error
BTW, the title is wrong, the title was just my first assumption, but it seems its combination of being in playmode + saving scripts + overwrite if exists
|
|
|
Post by echo17 on Mar 31, 2022 12:32:36 GMT
I'm not sure how Unity handles compilation and reloading of scripts while running a project. It sounds like that process is putting a lock on the database file that isn't removed when the compilation completes. Unfortunately, I don't have any visibility or ability to modify Unity's base code. I would suggest submitting a bug report to the Unity development team as they would be able to investigate and possibly submit a patch to fix.
Alternatively, I would recommend not changing the script code while the application is running. I'm sure that can cause other issues since the executable is loaded into memory while being modified through the compilation process. Other editors outside of the Unity processes, like .NET application development using Visual Studio, will not let you modify script while the application is running (for this reason). You actually have to go into the settings to disable the lockout, which comes with the price of side effects like you are seeing.
|
|
johnm
New Member
Posts: 4
|
Post by johnm on Mar 31, 2022 23:38:30 GMT
I apologize if this is a different issue but I came here to report the very same error, however I am not making script changes. It occurs when using SceneManager.LoadScene(). The first load is fine but subsequent loading will error out, such as loading from a menu scene. I may be wrong but it seems like Simple SQL is not releasing the database file lock when the game scene is unloaded.
Main menu scene --> game scene --> back to main menu scene --> game scene again (it errors here).
|
|
|
Post by echo17 on Apr 1, 2022 11:42:47 GMT
The first load is fine but subsequent loading will error out, such as loading from a menu scene. Check out this FAQ: linkThis one might also be useful: link
|
|