CMDRSpirit / RollercoasterDesigner

A toolset for creating and operating realistic rollercoasters in Unity. Includes per car simulation of forces, like rolling resistance and acceleration through gravity with full integration into the Unity Editor.
MIT License
17 stars 4 forks source link

Problems when Building projects #4

Open 4bgt opened 8 months ago

4bgt commented 8 months ago

Hi, I used this package to build a demo for a VR university course. Therefore, I had to build to apk. I had to manually add a few UnityEditor exceptions for things like undo actions in some of the scripts (mostly for functions that are just relevant in the editor). Moreover it was necessary to add if (Track.TMax == 0) { Track.CombineSections(); } to the PlaceTrainOnTrack function in the CoasterTrain Script to make the train move in the apk version. (it was always moving in the editor, but not in the build, this one was tricky to figure out :b)

I just thought it would be nice to leave it here, maybe you want to adapt the files, and even if not someone else might find this useful. Cheers and thank you for publishing this package, saved me a few days of work :) Niklas

CMDRSpirit commented 8 months ago

Thank you, I will look into it when I have time again. I had the same issue myself and thought I fixed it. There is some data Unity doesn't save when building the project which I guess leads to that case of the track sections being uninitialized.