title: Unassigned Reference Exception, Unity
body: <pre><code>public GameObject RIPEnemigo;        
  
  void Rekt()
  {
      GameObject RIP = (GameObject)Instantiate(RIPEnemy, transform.position, transform.rotation); //Instantiate of the particles
      Destroy(gameObject); //Destroys enemy
      Destroy(RIP, 2f); //Destroys particles
  }
  </code></pre>
  <p>I added the particles prefab and everything in the inspector is OK, but it says:</p>
  <blockquote>
  <p>UnassignedReferenceException: The variable RIPEnemy of Bullet has not been assigned</p>
  <p>You probably need to assign the RIPEnemy variable of the Bullet script in the inspector.</p>
  </blockquote>
  <p><code>RIPEnemy</code> is a particle effect</p>
  <p>Why? It's easy, when enemy gets hit -&gt; particles -&gt; RIP Enemy -&gt; RIP Particles. I've searched in the forum but I don't understand where's my error</p>