My particle system does not follow the script when it been deploy to device

I’m making a AR application. I don’t know if this problem happen because I’m doing an AR application because if in the game/scene it work well but the problem is after it been deploy to device.

Problem :

  1. the firePS worked in game scene but in device deploy it does not. I call it the script using button.
public ParticleSystem firePS;
public Button btnSweep;
public GameObject panel;

void Start()
    btnSweep = btnSweep.GetComponent<Button>();

public void AfterClick()
    ParticleSystem.MainModule m = firePS.main;
    m.maxParticles = 0;
    m.stopAction = ParticleSystemStopAction.Callback;

void OnParticleSystemStopped()