Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Curvy 2.0 compile error in unity 5.2.1p1

I am getting this error message:

Assets/Packages/Curvy/Controllers/UITextSplineController.cs(73,19): error CS0738: `FluffyUnderware.Curvy.Controllers.UITextSplineController' does not implement interface member `UnityEngine.UI.IMeshModifier.ModifyMesh(UnityEngine.UI.VertexHelper)' and the best implementing candidate `FluffyUnderware.Curvy.Controllers.UITextSplineController.ModifyMesh(UnityEngine.Mesh)' return type `void' does not match interface member return type `void'

I am importing curvy 2.0 in an empty project, so there should not be anything causing this. 

Is there a workaround on this?

I can't believe it, Unity changed the IMeshModifier interface with that patch, it wasn't present in 5.2.1f0. They marked the old method as [Obsolete], but of course this gives a big error instead of a warning as the new member isn't part of the interface. There is not even an info about this in the patchnotes. What's even more frustrating is that they changed it back to the old (5.0/5.1) behaviour, so I coded the whole 5.2 processing for nuts. Thanks, Unity!

I'll create a working solution tomorrow that will go into 2.0.2, will post the solution here as well.

For now, open the file and add
public void ModifyMesh(VertexHelper verts) {}
right above the last #endif in the file. This will remove the error, but of course UITextSplineController won't do anything then.
Thanks Jake! 

Unity need to do a better job at notifying developer changes they made!
Here is a version that should work with Unity 5.0,5.1,5.2 and 5.2.1.p1. Hopefully they don't change their mind with 5.2.1p2 again...

Just replace the file (in /Packages/Curvy/Controllers)!

Attached Files
.cs   UITextSplineController.cs (Size: 8.9 KB / Downloads: 27)
I'm using Unity 5.2.1f1 and got the following error on import.

Assets/Packages/Curvy/Controllers/UITextSplineController.cs(263,20): error CS1061: Type `UnityEngine.UI.VertexHelper' does not contain a definition for `Clear' and no extension method `Clear' of type `UnityEngine.UI.VertexHelper' could be found (are you missing a using directive or an assembly reference?)

Fixed it by commenting the whole #if !UNITY_5_1 && !UNITY_5_0 && !UNITY_4_6...  block
Replace vh.Clear() with vh.Dispose() - will be fixed in 2.0.3
(10-18-2015, 08:48 AM)Jake Wrote: Replace vh.Clear() with vh.Dispose() - will be fixed in 2.0.3

thx, worked
Thank you Smile

For those who cant get it working, make sure you add the ; to the end of the line...


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_
  Unity 2021.2 Overlay System nehvaleem 3 10 01-06-2023, 09:39 AM
Last Post: _Aka_
Bug Unity Play Mode Crash In Example 4 etoreo 2 4 01-05-2023, 10:46 PM
Last Post: etoreo

Forum Jump: