Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to build blueprints at runtime?
#1
I have a use case in which I need to create a softbody from a mesh that doesn't exist until runtime. Is this at all possible and if so how would I go about doing this?
Reply
#2
(06-05-2022, 02:51 AM)altalias Wrote: I have a use case in which I need to create a softbody from a mesh that doesn't exist until runtime. Is this at all possible and if so how would I go about doing this?

Hi!

Yes, blueprints are just ScriptableObjects. You can create them at runtime just like you do with any other SO.

Once the blueprint is created, set the parameters you desire for generation and call StartCoroutine(blueprint.Generate()) (if you want async generation) or manually advance the Generate() coroutine in a while loop if you don't mind waiting -a potentially long time- for it to finish.

See:
http://obi.virtualmethodstudio.com/manua...ctors.html
Reply