title: Unity 2D transform particle system
body: <p>I'm trying to figure out how position an explosion created with the Unity particle system. The explosion should happen where a bomb collides with a box collider. I am not having much luck with the C# script. Any advice is appreciated. Code snippet listed below. xPos and yPos are declared as floats.</p>
  
  <pre><code>   // This part works.
      xPos = collisionObject.transform.position.x;
      yPos = collisionObject.transform.position.y;
  
      // This part generates an error.
      explosionContainer.transform.position.x = xPos;
      explosionContainer.transform.position.y = ypos;
  </code></pre>