Unity, I can't make a Prefab out of a Tilemap - unity3d

When I try to create a prefab this happens:
I select the tilemap
I create the prefab by dragging it down
I open the prefab and nothing works
There is no way to edit it through its tile palette editor and it has only a tile.
I see this also when I try to instantiate a tilemap (both from a prefab or an already ingame gameobject)
How can I fix?

Related

Unity Missing Override Button

I cannot see override button in the Inspector menu for Player Prefab.
How can i make it appeared on the menu?
You already are in Prefab Edit mode so any changes are applied right away!
The override Dropdown only appears if
you are in the normal scene mode and have an Instance Override of your prefab asset directly in the scene level
your prefab is a Variant of another prefab
your prefab is a Nested Prefab instance under another prefab.
You can exit the prefab edit mode by clicking on the < arrow at the top of the Hierarchy window next to Player.

How to add a Tilemap to a prefab?

I have a Bomb prefab that gets dinamically added to the center of a 2D tile on keypress via a BombSpawner script. When the bomb explodes, I want it to affect multiple tiles in my Ground tilemap.
The explosion is inside the BombController script which is part of my Bomb prefab. I tried accessing the tilemap by adding it manually to the prefab:
public Tilemap tilemap;
But it doesn't work. I can only drag and drop the tilemap to the Bomb when it's in the scene, not to the prefab.
Is there a way to access the Ground tilemap inside the BombController script?
So, This is what is normal in unity when you are working with prefabs. You can only assign components/scripts anywhere in prefab if that component/script is a part of the prefab itself.
If component/script is in your scene hierarchy but not in the prefab. In your case, it was Tilemap object. which was in your scene hierarchy but was not the part of your prefab. Even if you edit the prefab directly in the scene view(Don't get confused with prefab editor which looks as same as scene view). and save the prefab the BombController.tilemap will always be null(None). Something Like
have you tried importing this library from unity
using UnityEngine.Tilemaps;
and then do that variable
public Tilemap tilemap;
enter image description here

Cant drag global gameObject into new unity nested prefab system

Im just starting to use the new Unity nested prefab workflow (or what ever you call it) in Unity 2018.3
So how it works is when you want to edit a prefab, you select it then click on the arrow. When you do this it erases everything from the hierarchy window and then you only have that prefab visible until your done editing it, you click save and then its back to the original hierarchy that was there before you started editing.
This is all fine, but the problem is what if i want to drag a game object from my scene into the prefab im editing is now impossible because as soon as you start editing the prefab, it removes your scene and only shows the contents of the prefab. So you cant drag anything from your scene into the prefab any more because its gone for the duration of the editing.
I dont know if im making myself clear or not.... But basically im saying while editing the prefab, only the contents of the prefab is visible, your scene is not visible, so you cant drag any object from your scene into the prefab anymore.
Anybody knows how to get around this? Right now i want to drag a gameObject from my scene into a prefab im editing to make a reference to a global object, but while editing the prefab my scene is not visible, so i cant do it.
Thank
Just create a copy of your prefab in Hierarchy and make you required changes to that copy once done, drag and drop that copy on you prefab and it will be updated.
When dropping the copy on your prefab you can either create a new prefab or update the original one.
Editing a prefab can be done in multiple ways. To achieve what you want, you should drag an instance of the prefab into your scene where your "other" gameobject is. Ensure that the prefab instance is blue, so that you know that it is still connected to the prefab.
Now, drag your "other" gameobject onto the prefab instance, so that it becomes a child of it. Now you should be able to apply prefab changes through the inspector.
Do note, if you cannot change the position in the hierarchy of the "other" gameobject onto a prefab from within the scene view. If you want to change the position, you should open the prefab scene after applying changes.

Unity2D: Prefab not working with animator

I have a prefab that is instantiate in using my spawning script. I also have a game over panel that slide down (this is done by animation) once the player dies. The problem I'm having is that the needs to be game over panel attach to the prefab in the inspector window for the game over panel to work. This image explains everything. Please help
in Unity you can't assign scene objects to prefabs because prefabs must be usable within all your scenes, so if a scene object was assignable to a prefab then the prefab couldn't be used in another scene.

Inspector is disabled in unity

I added a blender file to my assets, and when I click on this file in assets I can't add a component such as SkinnedMeshRenderer to the imported asset as shown in this screenshot. How I can add it?
A SkinnedMeshRenderer is not something you can just add in Unity.
As said in the documentation:
Unity uses the Skinned Mesh Renderer component to render Bone animations, where the shape of the mesh is deformed by predefined animation sequences.
A SkinnedMeshRenderer is automatically added when a skeleton is found in your asset. To have a SkinnedMeshRenderer you must export a skeleton from blender. If you don't have a skeleton, it means that a SkinnedMeshRenderer is not required.
The "Imported Object" is a Unity asset that doesn't accept additional components. Try creating a prefab (right click in Project folder and select Create -> Prefab), give it a unique name, and then drag the "Imported Object" mentioned above, from the Project panel not from the inspector, onto the newly created prefab object in the Project panel. Components can now be added to the prefab. Whenever referencing blender models access them through prefabs in such a way. Prefab copies can be added to the scene by clicking and dragging the prefab into the scene or by using GameObject.Instantiate with scripts.