Exemple #1
0
    public static ITextAssetReader CreateReader(TextAssetType type)
    {
        switch (type)
        {
        case TextAssetType.Txt:
            return(new TxtReader());

        case TextAssetType.Html:
            break;

        case TextAssetType.Json:
            break;

        default:
            break;
        }
        return(null);
    }
        internal void OnEnable()
        {
            string path = AssetDatabase.GetAssetPath(target);

            if (path.EndsWith("manifest.xml"))
            {
                AssetType = TextAssetType.Manifest;
                ManifestEditor.OnEnable(path);
            }
            else if (path.ToLower().Contains("list/maker/") && path.ToLower().EndsWith(".csv"))
            {
                AssetType = TextAssetType.MakerListFile;
                MakerListfileEditor.OnEnable(path, this);
            }
            else
            {
                AssetType = TextAssetType.Other;
            }
        }