// when button is pressed public void OnButtonPressed(VirtualButtonBehaviour vButt2) { //Debug.Log("````````````````````````````````button pressed " ); Creature particle = new Particle(); if (!particleOn) { particle = new Particle(); particle.SpawnSelf(prefabParticle, theTrackable); CreatureManager.AddCreature(particle); } else { CreatureManager.RemoveCreature(particle); } CreatureManager.ChangeParticleState(particleOn); }