Im getting a null issue with a variable. I cant figure out how to assign it.
public BrushTool brush;
public class BrushTool
{
public float width = 4;
public float hardness = 40;
}
public void Brush(Vector2 p1, Vector2 p2)
{
if (p2 == Vector2.zero)
{
p2 = p1;
}
Debug.Log(brush);
Drawing.PaintLine(p1,p2,brush.width,brush.hardness,col,baseTex);
baseTex.Apply();
}
The Drawing.PaintLine is where its calling the NRE. I know its this brush that causing it.Here is the Debug.Log:
Null
UnityEngine.Debug:Log(Object)