Skip to content

Instantly share code, notes, and snippets.

@WakkyFree
Created February 25, 2017 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WakkyFree/c23b1f4de210b667e14d38f181c62451 to your computer and use it in GitHub Desktop.
Save WakkyFree/c23b1f4de210b667e14d38f181c62451 to your computer and use it in GitHub Desktop.
Unity script to add particle effect to walls
using UnityEngine;
using System.Collections;
public class WallEffect : MonoBehaviour {
private ParticleSystem particle;
public int i;
// Use this for initialization
void Start () {
particle = this.GetComponent<ParticleSystem>();
}
// Update is called once per frame
void Update () {
}
void OnCollisionEnter(Collision collision) {
// if (collision.gameObject.tag == "Ball") {
particle.Play();
// }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment