I'm taking an online Unity3D class and after some straight C# stuff we're finally diving into Unity proper. When the teacher makes a project it starts with nothing but a Main Camera object. However, when I try to make a new project it comes with a directional light in the hierarchy window and some un-deleteable folders in the project window. Is there a way I can simply start the project as empty?
Your unity version is different (and that's ok)
Those undeletable folders are there because they are required by Unity in order to function correctly. And they actually exist in your teacher's Unity project too! You just don't see them because the root directory on your version of Unity is in a different place (previously the /Packages directory was hidden because the project window's root director was /Assets, if you were to open both projects in the file explorer window you would find them essentially the same).
The main camera and directional light are just helpful defaults, if you don't need them you can delete them (but most projects do need them).
Related
I'm actually working on a Unity project and I'm using Github.
I decided to do again the menu of the game but when I switch computer to work again on the project I got some issues with it.
As you can see a big part of my Sprites and Fonts don't load. When i set back the menu by putting Sprite textures to Sprite (2D and UI) and adding the component it works well. But when I push the modification and pull to another computer, the same problem happen. The Sprites textures are back to default :
All the other sprites or prefab are working well so I don't understand.
Version : 2021.3.4f1
Make sure you are using VisibleMetaFiles in ProjectSettings -> Version Control -> Mode
Make sure that the metafile for the texture with issues is not corrupted and is under version control (it will be right near your texture with the same name and the .meta extension)
Check the history of this metafile to make sure that it is really pushed to the repo and then downloaded from there
Import settings for the texture are stored in this metafile, so you need to make sure that it shares correctly between two computers
If I just copy the prefab file from folder to folder it won't work.
I will not see the prefab with all the materials textures.
In my original project after made changed to the GameObject in this case a door I dragged it to the Assets and a new prefab created. Now I want to copy and use this prefab in other project/s too.
Screenshot of the prefab in the original project:
Then in my new project after copying the prefab file only 7KB size:
Since it didn't work in the original project I did on the prefab right click and selected Export Package...
If I'm not checking to Include dependencies it will create a package and after importing it in the other new project it will not work again.
But if I check and use the Include dependencies it will make a package of more then 32MB file size with almost everything in my original project not only the door prefab I wanted.
Now it will work fine in the other project but it's crazy that I need to package almost the whole original project just for the door prefab.
In my new project I now so much things that are not connected to the door like scripts prefabs scenes.
And I did right click on the door only. I can't figure out why is it so hard to copy a simple small prefab and use it in another project.
Now in the new project I need to import the package and look in the screenshot the new package contains so much stuff look at the scroll bar on the right how many things it will import. 99.9% not connected in any way to the door prefab:
This is the only way to use the door prefab in another project/s
99.9% not connected in any way to the door prefab
It's wrong, they are relevant.
Scripts
The prefab has user scripts attached, then all the scripts will be included, because if you remove any class, the script may not be successfully compiled.
Models, Materials, Textures, Shaders
It looks like the prefab is created from a model, so all the model files, materials, textures and shaders will be included.
If a model file is a imported model (such as FBX), then the things (generated materials, animations, ...) related to this model will also be included.
Sounds
I see sounds are also in the list, so check your prefab, there may be a AudioSource with it.
So the conclusion is the simple small prefab is not simple in fact.
I had a Scene with a map (some buildings and roads) and Baked Navmesh, then I started Duplicating the Same Scene with modifying some objects inside (not the map or the world), so all the Scenes were sharing the same Navmesh somehow, then I deleted the Navmesh accidentally, Now the only way I seem to find is to create a new baked Navmesh for every Scene which will increase the build size too much!, How can I re-share the same baked Navmesh with all Scenes since all have the same map inside ? I am using Latest Unity3D.
Before You Start: if you have a lot of assets in your project changing serialization to Force Text may take a lot of time. So you may want to copy the target scenes to a new project, do the below mentioned steps and paste them back. :)
There is no way to do this from Unity editor, but there is a workaround:
Go to Edit > Project Settings > Editor and change the Asset Serialization to Force Text (default is Mixed) - this makes sure all assets, including your unity scene files are saved as text documents
Now open your scene file (the one with baked NavMesh) in any text editor
CMD+F or CTRL+F to focus on search bar and type "NavMeshSettings". In NavMeshSettings the last entree should be m_NavMeshData:{fileID:1234 //and some more stuff here} - this is reference to your baked NavMesh asset file. Copy the whole line
Now open the second scene that you want to share your NavMesh to (open in text editor again). Find exactly the same line starting with m_NavMeshData, delete it and past the line from the previous scene.
BOOM!
Edit/Tip: You may want to change serialization to Mixed again if you want to. The only downside of texted serialization is bigger files. It is mostly used for version controlling and merging and the scenes and stuff...
Me and some of my mates work together on a project in Unity. When I try to load the project, one of them gave to me (via Dropbox or USB-Stick, doesn't matter), I keep seeing the empty Hierarchy-window (I don't even see a main camera), although he created some objects in the scene.
The scene is definetly loaded in the editor, the name of the scene is shown at the top of the editor. I am not even able to instantiate a prefab in that scene, prefabs from the project are shown with a grey file-symbol, not with the normal blue "prefab-symbol".
By the way: We are using Unity 5.0.x
I hope you have a solution for my problem :)
The problem was a wrong setting of the meta-files and a version-conflict of Unity. The project was created with Unity 5.0.0, opening it with Unity 5.0.1 did not work.
I used to code in c# using Xna then I saw Unity 3D engine and I downloaded latest version installed correctly started development of my game but suddenly when I was importing my animated character Unity 3d blocked my pc ! I noticed that my keyboard goes off when that happened and I cant move arrow or call task menager I can only restart pc ! So brother and sisters help me on my way .
Model files that are placed in the Assets folder in your Unity project are automatically imported and stored as Unity assets.
A model file may contain a 3D model, such as a character, a building, or a piece of furniture. The model is imported as multiple assets. In the Project view the main imported object is a Model Prefab. Usually there are also up to several Mesh objects that are referenced by the Model Prefab.
A model file may also contain animation data which can be used to animate this model or other models. The animation data is imported as one or more Animation Clips.
What I understand in your question is that whenever you try to import assets into unity it makes trouble.
Try to place them in the folder in your drive and then run the project in Unity.
The normal path of Unity project is C:\Users\Public\Documents\Unity Projects
From what I understand; Your computer is spazzing out when you're trying to import Animated 3D characters into Unity 3D
I have faced a similar problem.
The solution I believe might work is :
Create the appropriate folders inside of unity. Assets > Models
Outside of unity, place the OBJ file for the models into your c:\Users\Public\Documents\Unity Projects\Your Project or wherever it might be, in the Assets\Models folder.
Then when you're inside unity, it should be in there without any issues.
That should do the trick.