Hey guys, so out of no where (I hadn't changed any scripts to my knowledge), my obirope seems to have broken. I'm currently using a slight variation of the GrapplingHook.cs script and for whatever reason, it just started giving these errors on play:
Line 46 in ObiRopeCursorEditor.cs is:
in the OnSceneGUI() function
To reproduce this, I opened a new project and imported ObiRope, then created two cubes. On one, I put the GrapplingHook.cs script and the other an ObiCollider and ObiRigidbody.
After pressing play, the GrapplingHook cube will turn into this strange icon and the first error listed above will begin being listed. Then, if you click on the other cube, the rest of the errors begin spewing out.
The above image used to be a default 3D cube, but turns to that upon pressing play.
This also happened in the GrapplingHook sample scene. Does anyone have an idea as to why that might be happening? I was using the rope with no issues for quite a while, and earlier it seemed to just decide to no longer cooperate lol.
Any help is appreciated as this is a pretty big aspect of my project.
EDIT:
By the way, I'm on Unity 2018.3.10f1 and the latest version of ObiRope from the asset store
EDIT2:
Something very strange is going on with ObiRope for me. I've tried using at least 5 different versions of Unity, I've deleted the Obi folder and redownloaded it into new projects, and all of them are broken. It seems that even adding the default ObiRope from the 3D Object menu doesn't work and just produces the same set of lines as the image above.
Also, strangely, in the sample GrapplingHook scene, if you first fire the rope in Play mode and then move to Scene mode, there will be no errors, but if you switch directly to scene mode and click on the object with the grappling hook script, the errors begin being listed.
EDIT3: So I took a super old copy of Obi from an old project and attempted using that, I got a new nullreferenceerror in obirope.cs. I noticed that for some reason, the ropes aren't being initialized on play, so I did some testing and tried calling rope.Initialize() (I made it accessible in ObiRope.cs) in the GrapplingHook.cs awake function, and surprisingly it worked. No more errors. Still doesn't make much sense to me though.
Line 46 in ObiRopeCursorEditor.cs is:
Code:
Vector3 pos1 = rope.GetParticlePosition(distanceBatch.springIndices[constraint*2]);
To reproduce this, I opened a new project and imported ObiRope, then created two cubes. On one, I put the GrapplingHook.cs script and the other an ObiCollider and ObiRigidbody.
After pressing play, the GrapplingHook cube will turn into this strange icon and the first error listed above will begin being listed. Then, if you click on the other cube, the rest of the errors begin spewing out.
The above image used to be a default 3D cube, but turns to that upon pressing play.
This also happened in the GrapplingHook sample scene. Does anyone have an idea as to why that might be happening? I was using the rope with no issues for quite a while, and earlier it seemed to just decide to no longer cooperate lol.
Any help is appreciated as this is a pretty big aspect of my project.
EDIT:
By the way, I'm on Unity 2018.3.10f1 and the latest version of ObiRope from the asset store
EDIT2:
Something very strange is going on with ObiRope for me. I've tried using at least 5 different versions of Unity, I've deleted the Obi folder and redownloaded it into new projects, and all of them are broken. It seems that even adding the default ObiRope from the 3D Object menu doesn't work and just produces the same set of lines as the image above.
Also, strangely, in the sample GrapplingHook scene, if you first fire the rope in Play mode and then move to Scene mode, there will be no errors, but if you switch directly to scene mode and click on the object with the grappling hook script, the errors begin being listed.
EDIT3: So I took a super old copy of Obi from an old project and attempted using that, I got a new nullreferenceerror in obirope.cs. I noticed that for some reason, the ropes aren't being initialized on play, so I did some testing and tried calling rope.Initialize() (I made it accessible in ObiRope.cs) in the GrapplingHook.cs awake function, and surprisingly it worked. No more errors. Still doesn't make much sense to me though.