HierarchicalNode.cs 924 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections.Generic;
  2. using Newtonsoft.Json;
  3. using Newtonsoft.Json.Linq;
  4. namespace AssetBank.Editor.SchemaConverter.Data.Output
  5. {
  6. /// <summary>
  7. /// Represents a node in the final hierarchical structure (e.g., a GameObject).
  8. /// </summary>
  9. public class HierarchicalNode
  10. {
  11. [JsonProperty(Order = 1)]
  12. public string anchor_id;
  13. [JsonProperty(Order = 2)]
  14. public string type_id;
  15. [JsonProperty(NullValueHandling = NullValueHandling.Ignore, Order = 3)]
  16. public bool? is_orphan;
  17. [JsonProperty(NullValueHandling = NullValueHandling.Ignore, Order = 4)]
  18. public ulong? prefab_guid_index;
  19. [JsonProperty(Order = 99)]
  20. public List<HierarchicalNode> children = new List<HierarchicalNode>();
  21. [JsonExtensionData]
  22. public IDictionary<string, JToken> Fields { get; set; } = new Dictionary<string, JToken>();
  23. }
  24. }