You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
637 B
C#

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