public void OnAfterDeserialize() { if (!string.IsNullOrEmpty(_serializedGraph)) { Graph = GraphSerializer.Deserialize(_serializedGraph); } }
public override void OnImportAsset(AssetImportContext ctx) { var textGraph = File.ReadAllText(ctx.assetPath, Encoding.UTF8); var graph = GraphSerializer.Deserialize(textGraph); var graphAsset = GraphAsset.Create(graph); ctx.AddObjectToAsset("MainAsset", graphAsset); ctx.SetMainObject(graphAsset); }