title: Unity Particle Collision 3D Game
body: <p>I am trying to add particles to my Collison but I receive errors. I keep getting his error from my code and I don't know why. The errors are: OnGUIDepth changed: was 0 is 1. Event type was 0 (56,60): error CS1001: Identifier expected. (56,55): error CS1003: Syntax error, ',' expected</p>
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class PlayerController1 : MonoBehaviour
  {
      public float horizontalInput;
      public float speed = 10.0f;
      public float xRange = 100;
      private Animator playerAnim;
      public AudioClip crashSound;
      private AudioSource playerAudio;
  
      public GameObject projectilePrefab;
      public ParticleSystem explosionParticle;
      public bool isOnGround = true;
      public bool gameOver;
      
  
  
      // Start is called before the first frame update
      void Start()
      {
          playerAudio = GetComponent&lt;AudioSource&gt;();
      }
  
      // Update is called once per frame
      void Update()
      {
          if (transform.position.x &lt; -xRange)
          {
              transform.position = new Vector3(-xRange, transform.position.y, transform.position.z);
          }
  
          if (transform.position.x &gt; xRange)
          {
              transform.position = new Vector3(xRange, transform.position.y, transform.position.z);
          }
          else
          {
          }
  
  
          horizontalInput = Input.GetAxis(&quot;Horizontal&quot;);
          transform.Translate(Vector3.right * horizontalInput * Time.deltaTime * speed);
  
          if (Input.GetKeyDown(KeyCode.Space))
          {
              //Instantiate(projectilePrefab, transform.position, projectilePrefab.transform.rotation);
              Instantiate(projectilePrefab, transform.position, transform.rotation);
          }
  
  
      }
  
      private void OnCollisionEnter(Collision collision other)
      {
          if (other.gameObject.CampareTag(&quot;Rock&quot;))
          {
              isOnGround = true;
          } else if (other.gameObject.CompareTag(&quot;Star&quot;))
          {
              Debug.Log(&quot;Game Over&quot;);
              gameOver = true;
              playerAnim.SetBool(&quot;Death_b&quot;, true);
              playerAnim.SetInterger(&quot;DeathType_int&quot;, 1);
              explosionParticle.Play();
              playerAudio.PlayOneShot(crashSound, 1.0f);
  
          }
      }
  }
  </code></pre>
  <p>Is there anything I need to fix in my code?</p>