Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving multiple controllers at once
#20
Hi,
While reading again your post, I noticed the "Line 42 is the first in the loop." that I missed when I first read it. So the line being
orgPos[index] = checkController.AbsolutePosition;
means that either orgPos is null, or checkController is null. Since checkController comes from selectedItems which does not contain null items, the reasonable conclusion would be that orgPos is null. The easy way to confirm this is to Log orgPos and checkController before using them line 42.

I feel that by going down the [CustomEditor(typeof(SplineController))] road, you are hunting the consequence and not the cause of your issue. Stay focused on the null reference. If there is a null referencing and you check and don't fin anything wrong, that means that you haven't checked good enough. With the logs I suggested earlier you will definitely find which variable is null
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
Moving multiple controllers at once - by Lupp_ - 01-15-2020, 07:46 PM
RE: Moving multiple controllers at once - by _Aka_ - 02-06-2020, 10:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Distance travelled across multiple splines jh092 1 7 02-23-2024, 09:44 AM
Last Post: _Aka_
  Best practice for controllers slowing down/speeding up along the spline Curry 1 5 08-06-2023, 09:47 PM
Last Post: _Aka_
  Moving object down or up the spline using gravity velikizlivuk 6 19 07-26-2023, 10:06 PM
Last Post: _Aka_
  Multiple Splines and Generators Performantly for Road System drock 1 6 07-17-2023, 10:31 AM
Last Post: _Aka_

Forum Jump: