using HGR.Core.Singletons; using System.Collections; using System.Collections.Generic; using UnityEngine; public class TWS_PreviewCharacterSpawner : Singleton { public GameObject malePreviewCharacterPrefab; public GameObject femalePreviewCharacterPrefab; public GameObject spawnedPreviewCharacter; public void SpawnPreviewCharacter(bool isMale) { if (spawnedPreviewCharacter) { Destroy(spawnedPreviewCharacter); } spawnedPreviewCharacter = Instantiate(isMale? malePreviewCharacterPrefab : femalePreviewCharacterPrefab, transform); } }