Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Saving Rope State
#9
(19-06-2020, 05:38 PM)emreaa Wrote: Thank you, your suggestions alleviated the problem to an acceptable degree for me. And working around distance and pin constraint iterations (lowering distance and increasing pin for this case) has helped also I guess. I have one more question, the last one hopefully, I implemented the prewarm feature earlier thanks to the post you shared earlier, but with that GenerateImmediate function commented out I lose all control in terms of editing the rope via blueprint and edit path, control point editing is not a must have even though it's good to have but I cannot change rope thickness (or rope resolution) via blueprint(not control points, but the rope as a whole) and that's challenging terms of workflow. If I uncomment GenerateImmediate I lose my saved states across the project even in unopened scenes. Is there any way to circumvent this?
Hi emreaa,

It's true that calling GenerateImmediate in OnValidate() prevents manual assignment of blueprints, since they get re-generated when you drag them to the rope in-editor. Commenting the line out however, prevents them from being regenerated when needed. I've yet to find a good solution for this, as Unity calls OnValidate() in situations where it shouldn't as far as I know.

Restoring the GenerateImmediate() call and assigning the new blueprint programmatically (instead of trough the editor) should circumvent this as its OnValidate() method would not be called at any point.
Reply


Messages In This Thread
Saving Rope State - by emreaa - 17-06-2020, 01:49 PM
RE: Saving Rope State - by josemendez - 17-06-2020, 05:11 PM
RE: Saving Rope State - by emreaa - 17-06-2020, 07:09 PM
RE: Saving Rope State - by emreaa - 18-06-2020, 12:30 AM
RE: Saving Rope State - by josemendez - 18-06-2020, 09:29 AM
RE: Saving Rope State - by emreaa - 18-06-2020, 10:19 AM
RE: Saving Rope State - by josemendez - 18-06-2020, 10:43 AM
RE: Saving Rope State - by emreaa - 19-06-2020, 05:38 PM
RE: Saving Rope State - by josemendez - 22-06-2020, 12:16 PM