using System.Collections; using System.Collections.Generic; using UnityEngine; public class WorkingPersonnel : MonoBehaviour { public static WorkingPersonnel instance; [SerializeField] string isWorkingPersonnel; [SerializeField] GameObject game; [SerializeField] GameObject g1; public Dictionary keyValuePairs= new Dictionary(); private void Awake() { if (instance != null) { Destroy(gameObject); return; } instance = this; } // Start is called before the first frame update public void init() { Debug.Log("¿ªÊ¼±ãÀû"); foreach (var item in keyValuePairs) { Debug.Log(item.Key+" "+item.Value); if (item.Key.Equals(GameManager.Instance.SceneName)) { GameManager.Instance.GanTan?.SetActive(item.Value); g1?.SetActive(item.Value); } } } }