You can not 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
588 B
24 lines
588 B
3 years ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using System.IO;
|
||
|
|
||
|
namespace YooAsset.Editor
|
||
|
{
|
||
|
public class ExtAsPrefix : IAddressRule
|
||
|
{
|
||
|
public string GetAssetAddress(AddressRuleData data)
|
||
|
{
|
||
|
string ext = Path.GetExtension(data.AssetPath).Substring(1);
|
||
|
string noExt = Path.GetFileNameWithoutExtension(data.AssetPath);
|
||
|
if (!string.IsNullOrEmpty(ext))
|
||
|
{
|
||
|
ext = char.ToUpper(ext[0]) + ext.Substring(1);
|
||
|
}
|
||
|
|
||
|
return ext + "_" + noExt;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|