Giter Club home page Giter Club logo

Comments (9)

zastrowm avatar zastrowm commented on July 27, 2024 5

@bqback I solved that problem by Erasing before painting. Something like this before Undo.MoveGameObjectToScene:

Erase(grid, brushTarget, position);

from 2d-extras.

LastAssertor avatar LastAssertor commented on July 27, 2024 3

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
=>
public class PrefabBrush : GridBrush

then

public class PrefabBrushEditor : GridBrushEditorBase
=>
public class PrefabBrushEditor : GridBrushEditor

then

protected void OnEnable()
{
m_SerializedObject = new SerializedObject(target);
=>
protected override void OnEnable()
{base.OnEnable();
m_SerializedObject = new SerializedObject(target);

from 2d-extras.

DanarKayfi avatar DanarKayfi commented on July 27, 2024 2

reproduced in 2018.3.0f2

from 2d-extras.

lijinglue avatar lijinglue commented on July 27, 2024

reproduced in 2018.3.0f1

from 2d-extras.

ChuanXin-Unity avatar ChuanXin-Unity commented on July 27, 2024

Hi, this will be fixed in a future version of Unity (both for 2018 and 2019 lines)!

from 2d-extras.

AntonStrickland avatar AntonStrickland commented on July 27, 2024

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.

from 2d-extras.

Krummelz avatar Krummelz commented on July 27, 2024

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
=>
public class PrefabBrush : GridBrush

then

public class PrefabBrushEditor : GridBrushEditorBase
=>
public class PrefabBrushEditor : GridBrushEditor

then

protected void OnEnable()
{
m_SerializedObject = new SerializedObject(target);
=>
protected override void OnEnable()
{base.OnEnable();
m_SerializedObject = new SerializedObject(target);

This solved it for me! Thanks!

from 2d-extras.

bqback avatar bqback commented on July 27, 2024

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
=>
public class PrefabBrush : GridBrush

then

public class PrefabBrushEditor : GridBrushEditorBase
=>
public class PrefabBrushEditor : GridBrushEditor

then

protected void OnEnable()
{
m_SerializedObject = new SerializedObject(target);
=>
protected override void OnEnable()
{base.OnEnable();
m_SerializedObject = new SerializedObject(target);

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.

from 2d-extras.

ChuanXin-Unity avatar ChuanXin-Unity commented on July 27, 2024

This has been fixed in Unity 2018.3.4f1, or you can continue to use the PrefabBrush as modified!

from 2d-extras.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.