I don’t rembember exactly when, but let’s say last year… i made a prefab brush for my prefabs with the help of the 2D EXTRAS package…
Now, with Unity 2021.1.4f and 2D extras package 2.00 i don’t see the option to create a prefab brush anymore?
I then read somewhere, its called GameObject Brush now. Okay. but i also cannot create it in my project folder,
so i can drag & drop it into a tile palette. The only thing i found was in the tile palette itself. I can choose Gameobject Brush instead of default brush.
And then i can drag&drop a prefab inside… But that’s not the good way it was before? I want my prefabs in my tilepallete so i can see the sprite and click on it etc… How do i achieve that? I can’t find any tutorials. The only official unity tutorial is about the prefab brush. Now they changed it but there is no explanation on how to use that…
No one? … nevermind. The Prefab Brush is there if you choose in the package manager version 1.5 of the 2d Extras… Then you have the prefab brush, but you can’t add it into the tile palette anymore. I don’t understand why would unity make something worse than better. It was the best thing to have the prefab brushes in the tile palette.
We added the GameObject Brush which contains most of the functionality of the PrefabBrush when it comes to painting GameObjects. You can also populate and pick from a Tile Palette with GameObjects using the GameObject Brush. A drawback would be that you would not be able to create and save different Brush assets which are selectable from the Brush dropdown unfortunately.
huh? that first thing sounds exactly what i wanted. since when you can but the gamobject brush into a tile palette? last time i checked, i can only choose gameobject brush from the dropdown and then manually put my prefab everytime again and again. are there more informations about that? tutorial?
Sorry to necro an old thread but google brought me here with the same issue. I’m glad to see it’s possible, and this way is definitely better than having a brush for every prefab…but wouldn’t it be better if we could just drag a prefab directly into the TilePalette? Why the need to have them in a scene and then select them with the eye dropper. That doesn’t seem very intuitive at all.
Also for any one else here you have to make sure your Active Tilemap is set to wherever your object is in the hierarchy. In my case I tried with my object at the root level and the eye dropper wasn’t working until I noticed the setting in the video.
Not a perfect experience, feels a bit redundant needing to drag my prefabs into a scene, align them to the grid, eye drop, then paint into the Tile Palette. Still loving the Tile tools though and I hope they continue to get developed.
True that! Test Depending on the Editor version you are on, it is already possible to drag in Prefabs/GameObjects directly into the Tile Palette clipboard. Just make sure to toggle on the Edit Mode. The workflow is very similar to dragging in new Sprites/Sprite Sheets into the Tile Palette. Dragging in GameObjects will also pop a dialog prompt asking for the location to save these newly generated Tile assets.
My bad! This is not yet supported but definitely something we would like to look into.
Alternatively, for users on 21.3 or older, it is also possible to drag in GameObjects into the Tile Palette Prefab Scene (in Prefab mode) by means of populating the Tile Palette.
Small note: When editing the Tile Palette prefab, it’s best to populate your GameObjects/Prefabs in the first Tilemap layer i.e. Layer1 because the GameObject Brush only picks from one layer.
On the other hand, if you have a custom brush, say the Layer Brush, it will take objects (Tiles/GameObjects) from each cell across each Tilemap layer like a bunch of stacked brushes. If that’s the case, you are free to populate GameObjects on any other layers however you like.
I made sure to toggle the Edit mode on, then created a new Prefab with a sprite renderer and tried to drag it from its folder onto the palette I couldn’t do it. The only way I could use the GameObject brush was to instantiate a prefab object, open the brush, drag and drop the Prefab in the cell and then paint a square in the Palette for future use.
Am I missing something here? Is there a faster way to import Prefabs to the tile Palette? Or a video documenting how should it be done?
@Aridez_1 What you can do as a work around is to create a Tile asset, click on it in the Project View to open it in the Inspector, and then toggle Debug Mode on. This will expose the private SerializedFields of the Tile asset. The field you want is InstancedGameObject; drag your Prefab into that field and you now have a Tile asset that uses your Prefab.
@suxiangting , I also have never had any luck dragging and dropping a Prefab from the Project View into the Tile Palette. I’ve tried all manner of adding the Prefab to Tile Palettes, editing a Tile Palette’s game object, etc., with no success (maybe I’m still doing something wrong?). What does work without fail is simply creating a Tile asset, and then updating its private fields (please don’t remove that functionality!). It’d be great if those fields were exposed by default, instead of requiring users to go into the Inspector’s debug mode. Having said that, I’d also like the ability to simply drag and drop a prefab into the Tile Palette (maybe something has changed recently; I haven’t tried in a couple months, definitely have tried in previous/earlier versions of 2022.1.x). Can you verify which version of Unity shipped that allows for dragging and dropping an arbitrary Prefab into the Tile Palette?
@Aridez_1@kayroice Unfortunately, there isn’t a way for you to drop a Prefab/GameObject onto the Tile Palette window directly. Right now, you will need to use the GameObject Brush, fill in the GameObject in the Cell and paint it onto the Tile Palette, or open up the Tile Palette asset in Prefab view and place your GameObjects in that view.
This is a really good suggestion though, and we will work on implementing this!
We will also expose all the properties of the Tile asset in its Inspector in the normal view as well.
Oops sorry guys, my bad! I might have accidentally tested the drag-and-drop functionality on an internal build. (Which I’m guessing had some internal R&D sorcery in it so sorry for the confusion.)
Yes, so I went back to try it on 22.1.17f1 proper, dragging the GameObjects prefabs into the Tile Palette window in Edit Mode is indeed, not yet supported. But like mentioned, it’s definitely a worthy interaction to look into.
However, it’s possible to drag-and-drop GameObjects prefabs into the Tile Palette Prefab in the Scene view already. I’ve recorded a 1 minute short video to show how it works. This might possibly be an alternative (and perhaps easier/quicker way) to use the GameObject brush for the time being?
Hey @Callvix and @ikorsa , as far as I’m aware, the GameObject Brush does not support randomisation at this moment. You may consider using the Prefab Random Brush instead which is available for download on GitHub.
The simplest way to load the Prefab Random Brush into your project is to:
Drop the folder into your project’s Package Manager folder.
Click back to Unity to reload the script assemblies. (This should be automatic.)
Right-click in the project window to create a Prefab Random Brush asset.
2D > Brushes > Prefab Random Brush.
You can create as many Prefab Brushes as you need.
Once done, you should be able to see your new Prefab Random Brush (together with other new Brushes) in your Tile Palette window. With that, you can start painting random 3D Objects.
Quick tip: To change the random distribution of Prefabs painted, change the Perlin Scale property. This will change the distribution of Prefabs painted on a particular cell. Still curious? You can read more about the Prefab Brush in our docs manualhere.