EntitasSaveLoader/Assets/Sources/Utility/EntitySaveLoader.cs
/// <summary>
///     make Json file and save to Resource/EntityTemplate.
/// </summary>
make Json file and save to Resource/EntityTemplate.
make Json file and save to Resource / EntityTemplate .
public void SaveEntityTemplateToSingleFile(IEntity entity, string templateName)
    {
        var json = MakeEntityInfoJson(entity, Formatting.Indented, templateName);
        var path = $"Assets/Resources/EntityTemplate/SingleEntity/{templateName}.json";
        if (!File.Exists(path))
        {
            File.Create(path).Close();
        }
        File.WriteAllText(path, json);
    }
public void SaveEntityTemplateToSingleFile ( IEntity entity , string templateName ) { var json = MakeEntityInfoJson ( entity , Formatting . Indented , templateName ) ; var path = $" Assets/Resources/EntityTemplate/SingleEntity/ { templateName } .json " ; if ( ! File . Exists ( path ) ) { File . Create ( path ) . Close ( ) ; } File . WriteAllText ( path , json ) ; }
make Json file and save to Resource/EntityTemplate.
make Json file and save to Resource / EntityTemplate .
entity
IEntity
templateName
string