using System.Collections; using System.Collections.Generic; using UnityEngine; public class muzzleController : MonoBehaviour { public List muzzleParticles = new List(); int index; void Start() { index = PlayerPrefs.GetInt("selectedCharacterIndex"); Debug.Log("index is" + index); //enablemuzzleParticles(index); //enableimpactParticles(index); //enablemuzzleParticles(index); } public void enablemuzzleParticles(int val) { muzzleParticles[val].SetActive(true); } }