Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue Curvy 2.0.2 in an EXE Build
I'm using the latest version of Curvy with Unity 5.2.1f1 (free).

I can get curvy to work fine while in the development environment, but when I want curvy to work in a demo build as an EXE, the curve doesn't appear.  Since I go directly to a build from a working version, I'm not sure what to look for to resolve this problem; is it an issue with Curvy?  The picture below describes the situation (note: that the yellow block placement and the curvy curve are all randomly generated). 

Either the curve doesn't generate or the control points don't get refreshed when I call "Spline.Refresh()".  Any ideas?

[Image: 36a1a26584.jpg]
The only difference to the editor is that in the editor the curve refreshes at more occasions (i.e. ControlPoints use Update() in the editor, but not automatically at runtime for performance reasons). When dynamically working with curves at runtime, there are a few basic rules:

* If you work with an existing spline at startup, be sure to check/wait for initialization ("while (!spline.IsInitialized) yield 0" in Start())
* If you change any spline parameters or add/remove Control Points, the spline is updated either in it's next call to Update() (next frame usually) or if you call spline.Refresh() manually
* If you change the position if Control Points, the spline needs to know about this. Three options:
   - use API to move the CP (CurvySplineSegment.localPosition etc...)
   - enable "Check Transforms" at the spline to automatically detect changed CP transforms
   - call CurvySplineSegment.SetDirty() manually

For the latter case, note that calling Refresh() only doesn't help because it only recalculates changed stuff, so you need to call SetDirty() before to make the spline know about changes.

If that doesn't help, please post your generation code.
Thanks Jake ... "CurvySplineSegment.SetDirty()" resolved my issue.

Possibly Related Threads…
Thread Author Replies Views Last Post
Brick Extending Curvy to make a Hallway editor. JacobSL 5 395 02-13-2023, 09:29 AM
Last Post: _Aka_
  Curvy does not like Unity 2021.3 (Attribute Conflicts) KasimirBlust 2 7 01-27-2023, 09:23 AM
Last Post: _Aka_
  Missing Loader errors after build FanManPro 8 9 01-20-2023, 11:45 AM
Last Post: _Aka_
Lightbulb In Game Roads - Curvy Generator Prefab? etoreo 3 9 01-05-2023, 09:16 AM
Last Post: _Aka_

Forum Jump: