How to export unity 3d scene to Android Studio - c#

I was working on android project, I needed to use Unity
I tried a very simple scene with a cube and simple UI text object as shown below
I spent a little time searching how to use this scene in Android Studio. I got a lot of tutorials but nothing worked for me.
I tried to export with this settings below:
and with this package name com.peixa.helloworld
I choose the directory to export this project to and I got this error.
here is the error:
Invalid build path: c:/users/abdelhamied/desktop/test/location
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I was struggling the whole day with this error, spent a lot of time searching but no result.
I did this before but I can't remember how I did it.
BTW: I could successfully build the project to APK file
I use android sdk tools 26 and unity 2018.3.0f2
Thanks in advance.

sorry about that dumb question
i tried it again and made new folder and i worked it seems like a bug
anyway it works now
sorry for your time

Related

How to solve this problem "unity android gradle build failed"

enter image description here
I am trying to release a game for Android, but I am getting these errors. I would be very happy if you can help me resolve these.
This is my full method of fixing these errors as they are very common for me and many other people.
This did come from my solution in Unity Forums (here’s the link): https://forum.unity.com/threads/man-its-a-hell-in-building-android-unity-2020-3-19f1.1209706/#post-8187237
But here’s the main fix:
Firstly uninstall and re-install the current unity editor completely by deleting it from ProgramFiles/Unity/Hub/Editor/YOUR_EDITOR_VERSION. Next I re-installed the same editor (MAKE SURE YOU SELECT ANDROID SDK, NDK AND JDK). Then delete your .gradle folder in Users/YOUR_NAME. I then deleted my Plugins folder in the assets of my project. Finally set JAVA_HOME variable to your unity editor OpenJDK location like this: ProgramFiles/Unity/Hub/Editor/YOUR_EDITOR_VERSION/Editor/Data/PlaybackEngines/AndroidPlayer/OpenJDK
After that restart your PC and run unity and when you build there should be no errors!

Unity C# - Cannot perform upm operation: Cannot read property 'map' of undefined [NotFound]

I am developing a game 3D under UNITY ( Unity 2020.1.3f1 ) with C# on windows, all things everything was working fine, suddenly the following error appears :
Cannot perform upm operation: Cannot read property 'map' of undefined [NotFound].See console for more details
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
And on the Package Manager in the Unity Registry i can't refreshing packages :
And the game on android crash on startup but it works on editor without any error
I found no explanation for this error and all the topics that talk about this error he talks about reactjs while I code with C# no relation with reactjs
Please Help me
I solved the problem after 3 weeks
I created a new 3D project with unity, and i copied all my assets on old project and past them on the new project after that some little bugs appears as scripts on object, function on buttons etc ...
and after the game works again without problem
until now i don't understand the error appeared and i don't find any explanation to that on unity support or on all forum of unity issue
For those who find this error make this solution that's work
Update:
based on this link try removing and re-adding the "Test Framework" package from the package manager and re-open the project, it may fix the problem.(if it didn't help check the answer below)
I had this problem for any imported project on Unity 2019.4.10f1 and the best solution I found was upgrading the project to another version.
I used Unity 2020.20.7f1 and now the package manager is working properly on the same project
This may be a bug in some of unity 2019 subversions.
I solved the problem like this
Close all Unity Editors
Log-out of Unity Hub and log-in again
Open the project again and check if Unity login is normal in the upper left corner
That's it

When opening Unity project, it is stuck on importing

I'm working on a Unity project (2020.2.1f1) on both my home PC and a workplace PC (which is 64-bit aswell and has the same Unity version). It all worked fine until today, when I tried opening my Unity project from my external SSD on my workplace PC, the opening process got stuck on "Importing... (busy for )"
What I tried so far:
Restarting my PC
Deleting various files in a copy of the project, such as the library or the meta files (deleting those just led to the resulting project looking awful and all script implementations missing ect)
The upm.log file states:
[INFO] Resolving dependencies using SAT solver
The editor.log has a massive bunch of code, but the last line states:
[C:/PROJECTNAME/Library/PackageCache/com.unity.ide.visualstudio#2.0.5/Editor/FileUtility.cs line 22]
(PROJECTNAME equals my project name which I dont wanna reveal here)
Anyone got an idea how I can get my project running again?
I've run into this a few times and have typically been able to resolve it by deleting the package cache at /Users/<USERNAME>/AppData/Local/Unity/cache before launching the editor.
Not sure what the root cause is though - so this is a workaround at best.
Do you use Unity Hub?
If so, just uninstall the unity version you are using and reinstall it or a newer one.

VS2017 Page is not supported in a Windows Universal project

I have a rather unpleasant problem since yesterday...
I cleared my NuGet chache because I couldn't get a NuGet-Package to work with one of my codes. But it didn't help and instead f***ed up the UWP apps I wrote before that.
I get errors for every element I have in my code like this:
In XAML it's mostly "XXX is not supported in a WIndows Universal project" and in the .cs files its a lot of "Cannot resolve symbol XXX"
How can I repair this?
I can compile and run my code just fine but I can't work with the code when everything gets detected as an error in VS and I can't see my UI while designing it...
I could really need some help here :/
Just putting this here... I had the same problem suddenly.
Updating the NuGet package for Microsoft.NETCore.UniversalWindowsPlatform fixed it for me instantly.
Ok I don't really know why that happend but I found my answer...
I tried restarting VS which didn't solve problem.
I tried restarting my PC which didn't solve problem.
I tried to build my code which didn't solve problembut no errors while building.
I tried to run my code which didn't work but app opens without a problem.
Next step confuses me a bit...
My Code is divided into 2 projects. One for all the XAML files and one for all my code files like Helpers, Converters, Collections...
I opened the NuGet-Manager in the second project and looked for possible updates to my packages. There was an update for the Fody-Package which I installed right away. Now everything seems fine again...even in the XAML project...
I don't understand why it works but it does :/

Missing project sub type error when trying to create a new MonoGame project

Hello Im using Visual Studio 2012 and whenver I try to create a new MonoGame content project I get this error...Also if I try to start a windows Mono project or a Android mono project I dont get the same error but whenever i try to compile i get errors, i have unstillaed Mono and xamarin and tried installing and that never solved the issue the only thing left to do is uninstall Visual Studio 2012 but that can take a ton of time so if anyone here can help me it will be appreciated here is the link to the following error.
I think I have a workaround for you, although, I still don't fully understand the issue myself and I'd love someone to shed some light on it.
If you open up the project file as plain text you will see a ProjectTypeGuids like so:
<ProjectTypeGuids>{9B831FEF-F496-498F-9FE8-180DA5CB4258};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
If you Google each GUID you will find that one of them is DotNetProjectSubtype id="MonoGame" and the other is Windows (C#).
As far as I can tell you can safely delete the MonoGame one and proceed with your day. I believe it's only used at project creation time.

Categories

Resources