ScriptableObject / Tree Data

Hello, I’m trying to set a valuable within a ScriptableObject.
I’ve got the data of a tree through a script

ScriptableObject Data = SpawnedTrees.GetComponent<Tree>().data;

the ScriptableObject/Data that i get from the tree contains a float Unique ID that i want to change, Would it be possible to edit this?
I’ve also read through Unity - Scripting API: ScriptableObject
that wasn’t any help.
Any help is always appreciated thanks for reading.

I’m a bit confused here, what is data? is it a float, right?

Maybe you need to read this to know how use scriptable objects:

http://buchhofer.com/2010/10/unity-toying-with-scriptable-objects/
http://buchhofer.com/2011/05/scriptable-objects-and-custom-editors/

You should create a class that inherits from ScriptableObject and put there your data fields , then you need to create a ScriptableObject instance for using it.

Well, maybe you can access the treedata like this,:

`TreeEditor.TreeData Data = (TreeEditor.TreeData)SpawnedTree.GetComponent<Tree>().data;`

then modify the data field.
I think it’s what you mean, right ?