private void OnPersonAdded(Person _person) { if (_person == null) { return; } PersonDisplay _display = Instantiate <PersonDisplay>(personDisplayPrefab, displayParent); _display.Initialize(_person); displayInstances.Add(_display); }
private void OnPersonRemoved(Person _person) { if (_person == null) { return; } PersonDisplay _display = GetPersonDisplay(_person); if (_display == null) { return; } _display.Shutdown(); displayInstances.Remove(_display); this.SafeDestroy(_display.gameObject); }