What sort of data type is Tree.data?

Hi all,

Does anyone know what sort of data is retrieved when you do Tree.data?
I’m trying to access the components of a Tree object and thought that searching for all of the components first, and then placing them in an array would be the best way to approach this.

There has been a lot of older questions where people have asked a similar thing i.e accessing the data in Tree objects (not terrain trees). A lot of the answers I have come across state that you can do this via: TreeEditor.TreeData

However, it seems like this method has been deprecated (or I’m doing something wrong) and I’m not sure what the replacement is.

Any help or pointers would be greatly appreciated!

Thanks

Tree.data is a ScriptableObject which you can see in your Tree asset.

If you view this ScriptableObject in inspector in debug mode, you can see that the script associated with it (i.e. the type of it) is TreeData. If you view TreeData script, it has following details:

Class Name: TreeData
Namespace: TreeEditor
AssemblyName: UnityEditor.TreeEditor.dll

If you need more details you can use a reflector to view this dll file. It is present at location: %UNITY_INSTALLATION%\Editor\Data\UnityExtensions\Unity\TreeEditor\Editor