public void AddLifeImage() { LifeImage lifeImageClone = Instantiate(LifeImagePrefab, transform); lifeImageClone.SetActive(true); _lifeImages.Add(lifeImageClone); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); LifeImage lifeImage = (LifeImage)target; if (GUILayout.Button("Active")) { lifeImage.SetActive(true); } if (GUILayout.Button("Deactivate")) { lifeImage.SetActive(false); } }