The RootObject
property of the PrefabFile
class contains the original JSON data that was read from a file. This property is of type System.Text.Json.Nodes.JsonObject
, which allows for easy manipulation and access to the JSON structure.
The RootObject
property of the PrefabFile
class contains the original JSON data that was read from a file. This property is of type System.Text.Json.Nodes.JsonObject
, which allows for easy manipulation and access to the JSON structure.
Use the RootObject
property to access or modify the JSON data associated with a prefab file. This can be useful for dynamically changing prefab configurations or for reading specific data points from the JSON structure.
// Example of accessing the RootObject property PrefabFile prefab = new PrefabFile(); JsonObject jsonObject = prefab.RootObject; // Access a specific property in the JSON string someValue = jsonObject["SomeKey"].ToString(); // Modify a property in the JSON jsonObject["SomeKey"] = "NewValue";