Reload Scripts Assemblies (busy for long time) Unity Freezes - unity3d

I'm Using Unity version 2020.3.32f1 & Rider as Editor. Whenever I make any changes in scripts, even small changes, Unity script assemblies take too much of time to compile and load. Sometimes it freezes Unity entirely and in the Task Manager I can see "application not responding" for the Unity session.
Does anyone know how I can solve this issue?

Disable Domain Reloading. To disable Domain Reloading:
Go to Edit > Project Settings > Editor
Make sure Enter Play Mode Options is enabled.
Disable Reload Domain
source https://docs.unity3d.com/Manual/DomainReloading.html

Edit > Project Settings > Editor > Check Enter Play Mode Options
Uncheck reload domain & reload scene
That worked for me .. unity 2021.3.4f1

After so much of research, I got one solution which worked for me , in Unity Package manager , Search for Rider & got Update for rider. After Updating Rider version from unity package manager. my Scripts reloading issue got fixed.

The Windows version of UnityEditor also has this problem.
Weirdly, if you have this problem, just save any file in your Unity project folder without changing anything and the progress bar will start progressing.

Open Window->Package Manager. Select Packages: In Project to see the packages currently installed. Remove everything you are not using.

Not being logged in in the Unity editor (upper left corner) certainly seems to increase the chances of this issue happening.
If you open the Package Manager without being logged in you get some errors in the console. I suspect this is related but in the script reload case it just hangs.

Related

Unity 3D is Layout Errors On a fresh install

Unity 3d doesnt work, when I try to open my project it says that This can happen if layout contains custom windows and there are compile errors in the project. I tried reinstalling OpenGL and something that I found on the internet but didn't work. The error window says that Revert Factory Settings but same thing happens after it too my Unity version is 2020.1.0a My OS is Ubuntu and I gave all the permissions to some folders. Didn't work And all this happened after a fresh install
Unity 2020.1.0a3 is an ALPHA VERSION!
As any alpha version it is not stable for production and can be expected to be full of bugs and unexpected behavior.
Search through the Known Issues in 2020.1.0a3 maybe your problem is already listed there.
In general do not touch alpha or beta versions unless you want to checkout a new added feature and test it.
For anything else stick to the stable releases like 2019.1.14f1 or 2019.2.6f1
On the last letter you can see their state:
a = Alpha
b = Beta
f = Release
Not sure if these are related but here and here also others had this problem already in early version so maybe one of their hot-fixes work for you as well.
This error may occur in released versions.
To resolve this problem:
Go to this directory:
C:\Users{YOUR_USER}\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default
Open Default.wlt file with Notepad or any text editor and copy all its contents.
Go to your unity project directory like this:
{YOUR_UNITY_PROJECT}\Library
Open CurrentLayout-default.dwlt file with Notepad or any text editor and delete all its contents then paste the contents of Default.wlt that you copied in step 2
If these files exist in Library delete them:
CurrentMaximizeLayout.dwlt
CurrentLayout.dwlt
Stop the Unity Hub service by a click the system tray and right-click on Unity Hub icon then select Quit Unity Hub.
Run your project again.

Disabling/Deactivating scripts in the Unity MonoDevelop

I have a folder in my Unity's Assets directory that contains several scripts with errors and missing directives, etc...
So, I looked for a way of getting Unity to disregard all those scripts until I have found the directives and solution...
I found out that in MonoDevelop, I could click on the little Settings icon that appears to the right of every script (on the Solution viewpad) and change their setting from Compile to None, but this still does not exclude them from being compiled, so I still get error messages that prevent me from running my Unity app.
Is there another way of doing this, without having to cut that directory out of my Unity project through windows explorer?
As far as I know - no, you can not do that: http://forum.unity3d.com/threads/excluding-unreferenced-scripts-from-builds.13406/
Because it's a development issue, you can just comment out all the code in those scripts. Ctrl/Cmd + A, then Ctrl/Cmd + /.

Intellisense in IntelliJ no longer working

I'm currently running IntelliJ IDEA 13.1. While running IntelliJ 13 intellisense/autocomplete stopped working. I tried upgrading and it still doesn't work.
I can explicitly invoke code completion using ctrl+space. I looked in Settings->Editor->Code Completion and nothing looks out of place. Is there somewhere else that turns this feature on/off?
For me it was because I did not have a folder marked as Source Root (it appears in blue).
To fix, right click your root source directory -> Mark As -> Source Root.
Check to see if you accidentally turned on Power Save (File/Power Save Mode) I myself just discovered that File/Power Save Mode does turn it off. I was having the same problem and must have accidentally set Power Save Mode to on.
I'm using Mac and when I upgraded to Big Sur my intellisense stopped working.
This is due Big Sur has a shortcut for Input Source. By disabling Mac shortcut, will make Intellisense work again.
You can see the option to disable in mac:
File -> Settings-> Editor-> General -> Code Completion-> Auto pop up code Completion
If other options mentioned is already true for you,try Setting up Sources/Test folder as Sources Root/Test Sources root as it did the trick for me. I had forgot it.
Right click on folder, choose "Mark Directory as" Test Sources or Sources Root, or whatever applicable. :)
Try disabling all plugins you have. I installed Codota and it turns out to be garbage. I uninstalled it and disabled the plugin in IntelliJ and it worked
Had the same problem and none of these helped. What I realized was that on mac, control + space is used by the OS to change language inputs and it overrides intellij. So if you are on mac having multiple input languages on your keyboard, consider changing the shortcut for it :)
I tried all the above option and it did not solve the issue. In my case:
THE ISSUE: node_modules was not loaded in the file structure of the project.
THE SOLUTION: go to explorer(finder/nautilus) find the .idea folder in the project and delete it. Then re-import the project. Once I re imported the project it loaded the node_modules folder as library root
Note: It will take a few seconds for IntelliJ to index all the libraries. You will see a loader on the bottom right next to line number info.
In my case, I restarted the Intellij and everything came back to normal.
Had the same problem until:
Third party JDK installed
Configured in module settings: right click on project name, then "Open module settings" -> SDKs -> "+". Pick the jdk root folder and Idea will take care of the rest.
Re-indexed a bunch of things. It happens automatically, just be patient
For me, it was I hadn't yet set up the JDK.
Type something out, Ctrl+Space to try to autocomplete. If it fails, do Alt+Space and if the option comes up to setup JDK, do that.
In IntelliJ 2017-2 to configure Autocompletion:
Settings -> Editor -> General -> Code Completion
In case this helps anyone; for me it was a windowing glitch of some kind. The suggestions popup showed on the wrong monitor, which I didn't notice the first time it happened.. after a while I saw what was happening. Resizing the window seemed to fix it.
If you're too lazy to restart your machine to fix the issue, you can kill the process taskkill /F /PID pid_number_of_idea64.exe (task manager -- view>select columns>PID) and then open CMD, head over to C:\Program Files\JetBrains\IntelliJ IDEA xxxx.xx.xx\bin, start idea.bat. Let this CMD window open.
Please note that even after executing taskkill, idea64.exe process doesn't disappear from task manager. Try executing the same command again and you'd know that process doesn't exist anymore.
For me the code completion suddenly stopped working because I had nudged the IDEA window slightly off-screen, maybe just a pixel or two, which caused the code completion pop-up to (presumably) appear off-screen. Making sure the application window was fully visible fixed the problem.
In case none of these work for you, if you are using IdeaVim, make sure your ~/.ideavimrc does not override Ctrl+Space, you can check this in vim:
:verbose map <c-space>
In my case, it was set by ~/.vim_runtime:
Last set from ~/.vim_runtime/vimrcs/basic.vim line 208
Thanks #s1n7ax for the tip!
IMPORTANT
If you had your email logged-in on IntelliJ Idea for a while and its token expire the Intellij will suddenly stop working or crash(My Version 2020.1.1).
Do two things.
1. file > sync settings with JetBrains account (log in here)
enter code here.
2. file > Invalidate cache / restart
I'm using Maven project, it works by:
File > Project Structure > Modules > Sources
and then marked java files dir as Sources.
reference link.
Spent hours to fix this problem too. For me, the answer was to disable a plugin.
Which one to disable? Just find out using trial and error since all kinds of plugins can cause errors...
It depends which product, for Intellij I might have to right click and import the .iml file from the root, or in Rider right click the solution file and open that. I'm only making this mistake 4 or 10 more times, and then it is never happening again.

Facebook SDK for Unity slow settings screen

I'm using the Facebook SDK for Unity v5.04 (also tried 5.03) and whenever I open the FacebookSettings panel in the inspector I get ridiculous slowdown to the point that I can't even use Unity. This only happens when I do that, does anyone know what might be wrong? I've tried it on multiple computers now and all have been experiencing this lag.
I am getting this same thing. I don't think this is happening to every project or the FB team would have noticed prior to pushing the builds out.
As far as I can tell, it only happens on larger projects. We have seen this same behavior in other plugins (namely one that one of our developers wrote) when the plugin tried to scan the project for a file of a specific name. It didn't show up in his tests but in large projects it made Unity almost unusable.
I tested the Facebook settings issue on a brand new project and it's fast.
Potential Solution Delete everything in your project except Facebook ;)
Edit: The settings menu appears to work just fine on a Mac. I have the same project on my PC and Mac (and the PC's specs are far better than the Mac's) yet it brings Unity to a crawl on the PC and it works fine on the Mac. Go figure :S
OP: If you add the SDK to a new project, or Facebook's sample project, do you see the same issue? Also, could you update with the Unity version you're using, so we can explore? Thanks!
I have the same problem
but when I follow this Link that solve "[Open SSL not found]" Problem >> The slow problem was disappeared.
this is the steps that I was follow:
1) Download and install OpenSSL. http://slproweb.com/products/Win32OpenSSL.html
Win32 OpenSSL v#.#.# (not Light)
OR Win64 OpenSSL v#.#.# (not Light)
2) Add the OpenSSL directory to your path.
Go to: Control Panel > System > Advanced system settings > Environment Variables
Select the Variable "Path" in the "System variables" window and click Edit.
3) Add the path to your OpenSSL bin folder to the end of the "Variable value" text. e.g. I added ";C:\Program Files\OpenSSL-Win64\bin" to the end of the value text.
Restart Unity3D.
take note do not forget to add semi-colon ";" before the C:/
4) If you get the error in FacebookSettings "Keytool not found", you need to add the JDK (Java Development Kit) bin directory to the Path variable value.
5) Follow the same steps as before, but instead of the OpenSSL bin path, add the JDK bin path. e.g. I added ";C:\Program Files\Java\jdk1.7.0_45\bin" to the end of the value text.
Restart Unity3D.

"selection cannot be launched and there are no recent launches" when using pydev/eclipse

I am getting the above error when launching a python file that worked in the past. I think I know how this happened but not sure how to fix it. I have 2 computers dual booting different os and use dropbox to stay synced between them all. In the past I synced my eclipse workspace with my mac and windows computers this way and everything worked fine(except I would have to change the location of the python interpreter depending on what system I was using).
I started getting the above message after I added a linux(fedora) to share dropbox files. But my problem is now when I try to update my python interpreter(in windows) it doesn't save my setting. I can hit autoconfig and it'll find the python path and all the files and I hit apply/okay, but when I go back its all blank. I'm pretty sure the linux machine messaged my settings up, but I need to develop on all 3 boxes so I need them to be kind of synced.
Wondering how to fix this and if there's another way to do this so I don't have this problem in the future?
update: this def. has something to do with my workspace. When I change the default workspace to a new folder and set the python interpreter it works. Still not sure how to permanently fix this(don't want to have to copy code back and forth to new workspaces.
I think an answer of how to share workspace among other enviroments is still very helpful but if anyone is having a simlair problem and just needs to fix it to work quickly here's the solution:
go to File, switch workspaces and figure out where your workspace is located
Go to that folder and rename the .metadata folder and relaunch eclipse
In eclipse everything will be missing, so go to file-->import and import the folder with all your projects(do the root folder of all the projects so you don't have to import each one individually).
setup any customizations you had before
This is not the best solution but it works. Hopefully someone else has a way of preventing this problem from happening in multiple environments.
It seems the preferred way is through F9: http://pydev.org/manual_adv_launch.html
eclipse run as same as what it run last time.
then first time run in this way.
in package explorer (left).
doubleclick res then menu.
then rightclick main menu (name.xml).
frmo menu select run then run as application.
and you can run as default in next time(from menu or shortcut).
This problem can often be solved by exiting out of eclipse and restarting (if that happens to be convenient for you). Changing workspaces midstream can often confuse Eclipse even if PyDev is correctly configured.