ibLeo

There appears to be a conflict in Unity in projects which use both Farseer Physics and Spine. If I create a project in Unity with the Farseer library, then attempt to import the Unity runtimes for Spine (spine-csharp and spine-unity), I immediately get a warning, then errors from Farseer, mostly focusing on the "Polygon" class. The warning is:

Script 'Animation' has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEditor.DockArea:OnGUI()


and an example of the errors is:

Assets/FarseerUnity/Base/FarseerPhysics/Common/Decomposition/CDTDecomposer.cs(51,22): error CS1061: Type `Polygon' does not contain a definition for `Points' and no extension method `Points' of type `Polygon' could be found (are you missing a using directive or an assembly reference?)

If I attempt to use the Spine components, they are unavailable.

Does this happen to anyone else? I haven't seen anyone else complaining about it and so am hoping that it's something I've done wrong (which can be fixed), rather than a fundamental incompatibility (which can't be fixed/is far more difficult to fix). So if anyone else here can confirm that it works for them with no problems that'll be helpful, even if you're unable to tell me what my ACTUAL problem is.

PS: just to pre-empt the most obvious response, I HAVE tried creating projects with both on their own, and INDIVIDUALLY, both Farseer and Spine work fine.
ibLeo
  • Сообщения: 5

Nate

The Animation warning can be ignored.

The Polygon problem I fixed in spine-csharp just now by moving Polygon in the Spine namespace.
Аватара пользователя
Nate

Nate
  • Сообщения: 9766

ibLeo

Excellent! It works now. When I had the problem I wasn't sure whose forums to ask the question in (it was arguably just as much a Farseer question or Unity question as a Spine question), but one of the guys said "Nate's the best to respond and fix", and you proved them right! :)
ibLeo
  • Сообщения: 5

Nate

Sorry you had to wait 12 minutes. ;) :D
Аватара пользователя
Nate

Nate
  • Сообщения: 9766


Вернуться в Runtimes