Can not start a new project as unity has "failed to load window layout" - unity3d

Clicking "load default layout" does nothing (just rerenders the alert box), clicking "revert factory settings" also does nothing.
I've googled this issue and the common solution is to reopen unity and to reimport all assests except this is a brand new project. There is nothing in it to import.
I've tried creating a new project and it still gives me this error.
I'm running version 2020.1.5f1 and the target platform is Windows 64-bit

Quit Unity and do the following:
Go to "AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default" or "~/Library/Preferences/Unity/Editor-5.x/Layouts/default" for mac, delete LastLayout.dwlt and copy Default.wlt
Paste Default.wlt into the "Library" folder of your project
Delete CurrentLayout-default.dwlt and rename Default.wlt to CurrentLayout-default.dwlt
Reopen Unity and load the project. The editor should open normally. You should now be able to create new projects as usual too.

the simple solution if it has yet to be tried would be to uninstall unity and reinstall.
if you have already tried that try updating to a newer version see if unity 2020.3 works to narrow the problem down a bit more. I had the same problem for me I just updated unity to a newer version and everything worked perfectly.

I tried the solutions posted by #carmelo343 and #Abhishek Dubey, but it still didn't work. My solution was to create the unity project using an older version (I used 2019.3.12f1), which shouldn't cause that layout error, then change the unity version to 2020.1.5f1 in Unity Hub (see below)
Unity Hub

go to "C:\Users<username>\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default"
Copy this file in your project library folder renaming it with "CurrentLayout-default.dwlt" and replace it with the old one.
Worked for me!!

I get this most every time I launch a project in Unity. Then I close and relaunch and all is fine. I am using a personal layout. I am using Unity 2020.1.8f1. These kind of things never happened before 2020 version.

just try this : in unity editor: Help -> Check For Updates -> uncheck the Check For Update

On Windows:
Open your project folder and delete the CurrentLayout-default.dwlt file
Go to "C:\Users<username>\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts"
Copy Default.wlt file to your project library folder and rename it to "CurrentLayout-default.dwlt"
my project opened normally without the warning.

I solved this by downloading and installing the latest Unity Hub.

I saved my project to a different location and was able to open Unity.

Related

Unity gradle templates folder missing (2021.3.6f)

I installed unity 2021.3.6f with android build support (NDK and SKD) using unity hub.
Going into a project and attempting to build it on android platform , I get this error :
FileNotFoundException: Failed to find $C:/ProgramFiles/Unity/Hub/Editor/2021.3.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\GradleTemplates\mainTemplate.gradle
I looked up in the directory and I don't even have the /Tools folder inside /AndroidPlayer.
Tried to reinstall unity and android module again but even after 2 times of reinstallation I still receive this weird error.
In unity Edit>Preferences>External-Tools>Gradle Installed With Unity is Ticked and marked to the /Tools folder which doesn't even exists
(there is also a warning below that saying I'm missing the recommended Gradle and I should install the recommended version using unity hub. but I already tried reinstalling everything)
I have used the unity android build before and it was always fine, perhaps this happens with the 2021.3.6f version that was released this week.
Can't find any solution to this anywhere, hope you can help.
Found the solution.
looks like the gradle folder has changed from AndroidPlayer\SDK\Tools to AndroidPlayer\SDK\cmdline-tools but the path still the old one inside Unity preferences.
Copy all folders and files inside cmdline-tools, create a new folder called Tools inside AndroidPlayer folder and paste there.
You can consider it as Unity Bug which will be fix in next update.
But for now please do the below workaround to fix this issue.
Go to the below location in the Unity installed folder
/Applications/Unity/Hub/Editor/2021.3.6f1/PlaybackEngines/AndroidPlayer/SDK/cmdline-tools/2.1
Now copy all the files and folders in this folder
Now Go back to the AndroidPlayer folder and create a folder Tools
Now paste copied files/folders in it and click on build and run.
Hope it will fix this issue.

Unity does not open when i try to open a project

I already tried reinstalling unity, installing .net, and installing visual c++
But none of that worked
(info-log.json https://notepad.ltd/4h6hr44m)
It also gives me a (0x000007b) error when i open unity.exe, but that must be because i opened it without a project
derHugo stated that it is because of 'ERROR.PROJECT.PATH_NOT_FOUND' as in the path of the project is missing, but i tried recreating the project and i also couldn't find the default project for unity 2d
Big update thanks to derHugo, The reason this doesn't work is because of the missing project files, unity doesn't create the default files for some reason and i tried everything... :(
BUT when i tried making the folder, it said, not proper project... this means the folder is correct and derHugo is correct, now we need to find out how to let it create the project

Why unityengine.ui is not recognized?

I have a problem were i try to create a score system in my game where the player is getting points based on the distance he travelled, and the vs code is not recognising the "Using UnityEngine.ui;" I already tried to switch vs code to a lower version (I went to 1.1.3) but it didn't work. Here is my code:
You Could try a could try a couple of solutions -
Solution 1) Relaunch the unity Engine and VS code and check.
Solution 2) Go to Edit > Preferences > External Tools make sure Edit > Preferences > External Tools make sure the
'Generate all .csproj files'
is checked the in your IDE delete the:
Assembly-CSharp-Editor.csproj
Assembly-CSharp.csproj
Ecology.sln
files in the root of your project.
Close and reopen vscode.
Solution 3) Uninstall Unity Hub and reinstall again and try.
Solution 4) UnityEngine.UIElements; instead of unityEngine.UI;
UnityEngine.UI namespace is a part of the aditional package called Unity UI, and it seems you don't have it imported in the project.
Click on Window on the top-left menu in Unity Editor -> Select Package Manager -> Search for Unity UI -> click Install.
Well it seems that I already had ui tool installed so I tried to unistall the package and reinstall it. Vs code still throws an error sometimes but after I close it and open it again it works just fine. Thank you all for your help.
There seem to be a problem with the VScode package version 1.2.4, where regenerating csproj files from the preferences doesn't make Unity UI symbols available in vscode.
Going Back to version 1.2.3 solved the issue for me (from latest Unity 2020.3 LTS release).
These steps covered several possible issues:
https://stackoverflow.com/a/70977258/6046022
(just an overview, follow the link for the complete steps)
downgrade VSC package
re-install Unity UI
regenerate files
I have the same error what take me a lot of time to fix. And finally I found my reason that I meet a problem with duplicated extension in the same project. My one is "External Dependency Manager" what somehow installed already on Unity Package Manager, after I delete old Admob plugin and install new one what make install new "External Dependency Manager" without override or delete old one. That make Unity not work well.
So check and try to delete/uninstall "External Dependency Manager" in Unity Package Manager first then import new one will be fine. At least in my case
Hope this help

VSCode: Attempted to update project that is not loaded

I am using VSC for Unity v2019.4. I have the package from package manager installed. Also I have installed dotnet. The thing is that when I open VSC (through Unity) it shows in the output:
Attempted to update project that is not loaded: C:\workspaces\Unity\MyGame\Assembly-CSharp.csproj.
am able to use the editor, but the Intellisense is not working. I also have tried to change the omnisharp version to latest and it is still not working.
You can try a few things in order to make Visual Studio Code works properly with Unity.
First of all make sure that the editor package is installed in your project via Package Manager. Latest version should be installed.
Just to be sure it's better to close the project, delete Library folder and all .csproj and .sln files.
Then you can open your project in Unity again, wait it to load and try to remember to open scripts not by double clicking, but instead use right click in Project window and select Open C# Project. This will load the scripts without any issues.
In case anyone is still having this problem, try to install .net framework 4.7.1
Try uninstalling then reinstalling vs code and dotnet latest version. Also make sure vs code is installed in a folder with permissions to edit. If not it will not save any files until you run as admin

How to force eclipse to use the SceneBuilder executable file? Mac os x

I'm trying to get SceneBuilder to work with Eclipse v4.4.2 on Mac OS X. I'm following the advice from this tutorial: http://code.makery.ch/library/javafx-8-tutorial/part1/. I downloaded the Mac OS .dmg version of the SceneBuilder app from here: http://gluonhq.com/products/downloads/. It works when I run it as a stand alone.
When I try to configure Eclipse to use the app as part of the e(fx)eclipse package, Eclipse seems to be configured to look for the file Contents/MacOs/scenebuilder-launcher.sh in the application package contents. The version of the app I have doesn't have it, instead it just has the executable Contents/MacOs/SceneBuilder.
Failure to launch SceneBuilder [...] Cannot run program "/Applications/SceneBuilder.app/Contents/MacOs/scenebuilder-launcher.sh". No such file or directory.
Does anyone know which version of SceneBuilder I should be using (and where I can get it), or is there a hacky solution to sort this?
Just playing around with the SceneBuilder standalone it seems like it's a big step up from WindowBuilder, shame that just finding a packaged/compiled version of it has been so difficult!
The answer provided by ItachiUchiha is not the full solution with the new binaries provided by Gluon. Obviously they have forgotten to package the file Contents/MacOs/scenebuilder-launcher.sh with the new binaries. It is however sufficient to just copy over this file from an old version of SceneBuilder to make the launch from within Eclipse work.
Hi guys my solution is not clean by the way I use:
On OSX :
$cd /Applications/SceneBuilder.app/Contents/MacOS/
$ln -s SceneBuilder scenebuilder-launcher.sh
And for that works.
On a Mac:
I just installed sceneBuilder 8.3.
After setting up Eclipse with the proper SceneBuilder executable (in the Applications folder)
I had the same problem.
Failure to launch SceneBuilder [...] Cannot run program "/Applications/SceneBuilder.app/Contents/MacOs/scenebuilder-launcher.sh". No such file or directory.Error=2
Then in Eclipse I went to the
Help Menu, Check for Updates and Installed
all of the latest updates offered.
When I was asked if OK to Re-Start Eclipse I clicked OK.
After Eclipse restart
I Right Clicked on a Main.fxml and selected
Open with SceneBuilder.
It worked perfectly.
Best of Luck to you all
You can change the path in
Eclipse -> Preference -> JavaFX -> SceneBuilder Executable
I had this same issue on my mac following the code.makery tutorial but discovered you can still use the official JavaFX Scene Builder 2.0 download from oracle.com available at JavaFX Scene Builder 2.0.
After downloading and installing (by double-clicking on the downloaded .dmg file and dragging to the application folder), simply navigate to Eclipse>preferences>JavaFX and then browse to your Applications folder and select the JavaFX Scene Builder app you just installed. Worked and is still working for me!
I downloaded the older version of scene builder from oracle site. Copied the scenebuilder-launcher.sh from the fresh installation directory to the Glueon scenebuilder directory. And this fixed the issue.
My solution on Mac OSX was gleaned from the bug report at https://github.com/gluonhq/scenebuilder/issues/2. Apparently newer versions of Scene Builder (not including version 2 and before) are missing the scenebuilder-launcher.sh file. To make this all work, do the following.
Install a new version of Scene Builder from Gluon (not Oracle). I used https://gluonhq.com/products/scene-builder/. Install AND OPEN Scene Builder. For this to work, it is important to actually open Scene Builder before attempting to use it in Eclipse. If you don't, the first invocation under Eclipse will attempt to pop up a the normal OSX security message which, of course, it can't do because it is being invoked from a shell script. This only happens on first invocation, so the next time you won't have the problem. You get a message to the effect that the application is damaged. You will also get this message if you install a new version. Just invoke the Scene Builder application standalone before continuing to use it with Eclipse.
open a terminal session (sorry I don't know of another way to do this otherwise as you need to make the file you create executable)
cd /Applications/SceneBuilder.app/Contents/MacOS
sudo vi scenebuilder.sh (or use your favorite editor other than vi)
cut-and-paste the file from the Gluon issue into your editor and save it.
sudo chmod +x scenebuilder.sh
open Eclipse and open Preferences > General > Editors > File Associations (or type file in the filter box and select File Associations.
scroll down to .fxml in the file type box and select it. If you don't see it, click add to the right of the file types list. Enter .fxml and click OK.
in the associations pane, click Add to the right of the associations pane and click the Internal radio button. Scroll down to Scene Builder and select it. Click OK, the Apply and Close.
You should now be able to right-click on an .fxml file and click Open with Scene Builder and Scene Builder should start with the fxml file open in the builder.