-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefab brush throw an error #64
Comments
reproduced in 2018.3.0f1 |
Hi, this will be fixed in a future version of Unity (both for 2018 and 2019 lines)! |
The error happens because after placing the object, the active tilemap is set to "Nothing" and so you get a null reference exception. Until there is a real fix, you can get around it by resetting the tilemap (click away from it and then click back on it) every time you place an object. |
Unity 2018.3.0f2 i try to modify ‘PrefabBrush.cs’, it seems solved, but can not limited to children of the currently selected GameObject. public class PrefabBrush : GridBrushBase then public class PrefabBrushEditor : GridBrushEditorBase then protected void OnEnable() |
reproduced in 2018.3.0f2 |
This solved it for me! Thanks! |
Thank you for this fix (worked on 2018.3.0f2)! Although there's a problem: while the brush no longer throws an error and resets, it now draws a new sprite for every little movement of my mouse cursor within a single tile (so rapidly moving my mouse back and forth across a few pixels creates dozens of the same object), which I doubt to be the intended effect, Same goes for the eraser -- moving the eraser back and forth within a single tile allows me to quickly erase all of those excess sprites. |
@bqback I solved that problem by Erasing before painting. Something like this before
|
This has been fixed in Unity 2018.3.4f1, or you can continue to use the PrefabBrush as modified! |
Unity 2019.1.0a7
Hi! I'm trying to use prefab brush in my project as shown in official unity tutorial here -> https://unity3d.com/learn/tutorials/topics/2d-game-creation/custom-tilemap-brush-spawn-prefabs?playlist=17093 but it doesn't work.
It just places one object and then it doesn't paint more prefabs and there are thrown some exceptions in the console
The text was updated successfully, but these errors were encountered: