I have a public variable in a script attached to my player that allows for a specific scriptable object type to be referenced. Obviously, I could easily drag a scriptable object asset into this field, but that doesnt solve my problem. I need to be able to change the scriptable object asset programmatically with a function called by an onclick event.
I think something like this would work for my intended purpose:
public Ghost selectedGhost;
void ChangeSelectedGhost(){
selectedGhost = ***Reference to scriptable object asset***;
}
Does anyone know if this is possible? Thanks for any help ahead of time.