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.
|
|
|
using HGR.Core.Singletons;
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|