Hello, I’m really stuck here and I appreciate your help.
I wrote the code just as it is said in the video, but i still get
"NullReferenceException : Object reference not set to an instance of the object." error.
if I only write this line it works just fine, the brick gets destroyed and white particles play
GameObject smokePuff = Instantiate(smoke, transform.position, Quaternion.identity) as GameObject;
I add this line, build in the mono and it gives no error, but on the console it still gives the error.
The bricks dont get destroyed and white particles play.
smokePuff.particleSystem.startColor = gameObject.GetComponent<SpriteRenderer>().color;