[ScriptedImporter( 1, "lua" )]
public class SrtImporter : ScriptedImporter {
public override void OnImportAsset( AssetImportContext ctx ) {
TextAsset subAsset = new TextAsset( File.ReadAllText( ctx.assetPath ) );
ctx.AddObjectToAsset( "text", subAsset );
ctx.SetMainObject( subAsset );
}
}
Unity 如何支持其他类型后缀作为TextAsset
最新推荐文章于 2024-03-18 00:47:34 发布