Posts: 11
Threads: 2
Joined: Jan 2018
Reputation:
0
Hello,
After downloading Obi Rope 3.2 in Unity 5.6.5f1 my application will no longer compile with the following errors:
Assets/Obi/Scripts/Solver/ObiArbiter.cs(19,36): error CS0066: `Obi.ObiArbiter.OnFrameStart': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiArbiter.cs(20,36): error CS0066: `Obi.ObiArbiter.OnFrameEnd': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(88,28): error CS0066: `Obi.ObiSolver.OnFrameBegin': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(89,28): error CS0066: `Obi.ObiSolver.OnStepBegin': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(90,28): error CS0066: `Obi.ObiSolver.OnFixedParticlesUpdated': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(91,28): error CS0066: `Obi.ObiSolver.OnStepEnd': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(92,28): error CS0066: `Obi.ObiSolver.OnBeforePositionInterpolation': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(93,28): error CS0066: `Obi.ObiSolver.OnBeforeActorsFrameEnd': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(94,28): error CS0066: `Obi.ObiSolver.OnFrameEnd': event must be of a delegate type
I figure I must be doing something wrong since nobody else has mentioned this yet, but I took great pains to update Unity to this version so I could try this asset and I still can't get it to compile at all. What do I need to do?
Thanks,
Jon
Posts: 6,216
Threads: 23
Joined: Jun 2017
Reputation:
392
Obi Owner:
(15-01-2018, 03:53 AM)jonworks Wrote: Hello,
After downloading Obi Rope 3.2 in Unity 5.6.5f1 my application will no longer compile with the following errors:
Assets/Obi/Scripts/Solver/ObiArbiter.cs(19,36): error CS0066: `Obi.ObiArbiter.OnFrameStart': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiArbiter.cs(20,36): error CS0066: `Obi.ObiArbiter.OnFrameEnd': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(88,28): error CS0066: `Obi.ObiSolver.OnFrameBegin': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(89,28): error CS0066: `Obi.ObiSolver.OnStepBegin': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(90,28): error CS0066: `Obi.ObiSolver.OnFixedParticlesUpdated': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(91,28): error CS0066: `Obi.ObiSolver.OnStepEnd': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(92,28): error CS0066: `Obi.ObiSolver.OnBeforePositionInterpolation': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(93,28): error CS0066: `Obi.ObiSolver.OnBeforeActorsFrameEnd': event must be of a delegate type
Assets/Obi/Scripts/Solver/ObiSolver.cs(94,28): error CS0066: `Obi.ObiSolver.OnFrameEnd': event must be of a delegate type
I figure I must be doing something wrong since nobody else has mentioned this yet, but I took great pains to update Unity to this version so I could try this asset and I still can't get it to compile at all. What do I need to do?
Thanks,
Jon
HI Jon,
We cannot reproduce this. We downloaded the same Unity version (5.6.5f1), using Obi Rope 3.2, no compilation errors at all. Have you tried importing Obi in a clean project, to rule out any issues with your particular project?
cheers,
Posts: 11
Threads: 2
Joined: Jan 2018
Reputation:
0
(15-01-2018, 09:16 AM)josemendez Wrote: HI Jon,
We cannot reproduce this. We downloaded the same Unity version (5.6.5f1), using Obi Rope 3.2, no compilation errors at all. Have you tried importing Obi in a clean project, to rule out any issues with your particular project?
cheers,
Hello,
Thanks for your quick reply. I tried importing Obi to a clean project and it compiled. So what could be different about my project that prevents it from compiling?
My project is at least 50k lines of code plus a half dozen assets and compiles with no errors and no warnings, until I import Obi.
Jon
Posts: 11
Threads: 2
Joined: Jan 2018
Reputation:
0
Hello,
I started individually importing each DLL, asset and script in my project into the fresh project with Obi Rope imported first until I found the source of the problem. I think this might have been suggested if I had been able to wait for the next reply.
Coincidentally and perhaps ironically, this is not a problem with Obi Rope but actually a problem with one of the competing assets in the asset store, WYSWYG rope editor, which is the current rope solution in my project. They made a couple of really poor decisions, first not using a new namespace for their asset and second naming one of their scripts EventHandler.
This problem is the result.
The solution I chose is to edit the five scripts in WYSWYG rope editor to use their own namespace and the problem went away.
The problem could also probably be solved within Obi Rope by replacing EventHandler declarations to specify System.EventHandler, which is probably not necessary but totally worthwhile as it could improve perceived initial quality for other users in the future.
Jon
Posts: 6,216
Threads: 23
Joined: Jun 2017
Reputation:
392
Obi Owner:
18-01-2018, 09:43 AM
(This post was last modified: 18-01-2018, 09:43 AM by josemendez.)
(17-01-2018, 10:39 PM)jonworks Wrote: Hello,
I started individually importing each DLL, asset and script in my project into the fresh project with Obi Rope imported first until I found the source of the problem. I think this might have been suggested if I had been able to wait for the next reply.
Coincidentally and perhaps ironically, this is not a problem with Obi Rope but actually a problem with one of the competing assets in the asset store, WYSWYG rope editor, which is the current rope solution in my project. They made a couple of really poor decisions, first not using a new namespace for their asset and second naming one of their scripts EventHandler.
This problem is the result.
The solution I chose is to edit the five scripts in WYSWYG rope editor to use their own namespace and the problem went away.
The problem could also probably be solved within Obi Rope by replacing EventHandler declarations to specify System.EventHandler, which is probably not necessary but totally worthwhile as it could improve perceived initial quality for other users in the future.
Jon
Hi Jon,
To be honest, I would have never guessed this one out. We were trying different Unity versions, compilation and project options (mono 2.0, subset, experimental editor features, etc) trying to reproduce it (in vain) but now the error message makes complete sense. The compiler was mistaking System.EventHandler for their globally defined custom EventHandler type, and complaining about it not being a delegate.
Thanks a lot for taking the time to explain the cause. We will definitely replace EventHandler with System.EventHandler and remove "using System;" for more robustness. Even though they (the WYSWYG guys) should really use their own namespace, though.
|