UniversalViewer/Assets/Eversoul/Scripts/CharacterAsset.cs

20 lines
444 B
C#
Raw Normal View History

using System;
using System.IO;
[Serializable]
public class CharacterAsset : AssetSpawnData
{
public string Name;
public string Prefab;
public CharacterAsset(string assetName)
{
var split = assetName.Split(new char[] { '/', '.' });
ResourceName = assetName;
AssetType = AssetTypes.Character;
Prefab = Path.GetFileNameWithoutExtension(assetName);
Name = split[split.Length - 4];
}
}