methusalah / SplineMesh

A Unity plugin to create curved content in real-time with bézier curves
https://twitter.com/dumas181
MIT License
1.05k stars 104 forks source link

error CS0066 in SplineNode.cs #57

Closed tewfik-dj closed 2 years ago

tewfik-dj commented 2 years ago

Hi, thank you so much for the great tool and the open source initiative! Great tool.

Sadly, I wasn't able to make it work on Unity 2022.1.5f1 (haven't tested on other versions at the moment)

I get the following error

Assets\SplineMesh\Scripts\Bezier\SplineNode.cs(105,35): error CS0066: 'SplineNode.Changed': event must be of a delegate type

I tried the following patch but to no avail (I'm not very familiar with events and delegates in c#)

https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs0066

public delegate EventHandler();
public event EventHandler Changed;

How to reproduce

A screenshot of the error if this could help :) https://pasteboard.co/mN3L28uBbZRz.png

Many thanks!

https://github.com/methusalah/SplineMesh/blob/71c4591f5531af06e8555fa76c8ece0c466ee3e8/Assets/SplineMesh/Scripts/Bezier/SplineNode.cs#L105

tewfik-dj commented 2 years ago

Update - when used in a new (fresh) project it works perfectly on Unity 2022.1.5f1 This means there is a conflict with another package that needs to be addressed - I will investigate and hopefully provide an explanation / fix.

Thanks!

tewfik-dj commented 2 years ago

Closing this issue as it has to do with another asset (Gley Traffic system) that declares EventHandler (which is not right) which causes the mentioned issue.