Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink
Go down
Member [Lv. 0]
Member [Lv. 0]
Posts : 1
Points : 1467
Rep : 0
Join date : 2014-07-15
View user profile

Particle Systems

on Thu Sep 11, 2014 10:18 am
Ok i have spend a few hous going through unity answers and looking at the scripting API and i cannot figure out why my code is poping up errors. Im still learning C# in Unity so i probaly need someone to just. Im working on a teleporter that has a particle system as a trigger when you land. I have two different scripts for that the teleport one works perfectly but the particle system will not compile. Also i only want to particle system to activate when i trigger it.
the error is in

                var myParticles = GetComponent(particleSystem);
it says cannot resolve component GetComponent.UntitEngine.ParticleSystem).
I have also tried
var myParticles = GetComponent.particleSystem

using UnityEngine;
using System.Collections;

public class ParticleSystem : MonoBehaviour {
  // initialization of particle system
   void Start () {
   // Update is called once per frame plays system on trigger
   void Update () {
        if ( collider.isTrigger == true)
            var myParticles = GetComponent(particleSystem);
Back to top
Permissions in this forum:
You cannot reply to topics in this forum