01-11-2021, 12:06 PM
Hi,
I create ropes via script using the RopeBetweenTwoPoints.cs sample script.
Once the rope is generated, I want to be able to edit the blueprint to my liking and save the blueprint of the rope for future use.
The only problem is the blueprint is created using
var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
Now I can edit the rope in playmode but since the blueprint is an instance it doesn't get saved.
If I save the rope as a prefab the blueprint still dissapears.
I know I can manually create blueprints and edit them in the editor, but I intend to create 20+ ropes and it would be tedious to manually create each new rope and blueprint.
How can I save a rope as a prefab/save the rope's blueprint after it has been generated and edited in playmode?
I create ropes via script using the RopeBetweenTwoPoints.cs sample script.
Once the rope is generated, I want to be able to edit the blueprint to my liking and save the blueprint of the rope for future use.
The only problem is the blueprint is created using
var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
Now I can edit the rope in playmode but since the blueprint is an instance it doesn't get saved.
If I save the rope as a prefab the blueprint still dissapears.
I know I can manually create blueprints and edit them in the editor, but I intend to create 20+ ropes and it would be tedious to manually create each new rope and blueprint.
How can I save a rope as a prefab/save the rope's blueprint after it has been generated and edited in playmode?