Home › Forums › A* Pathfinding Project › Beginner Questions › Compilation error
This topic has 2 voices, contains 6 replies, and was last updated by Linus 104 days ago.
| Author | Posts |
|---|---|
| Author | Posts |
| December 27, 2011 at 01:30 #1145 | |
|
Pooh |
Hi everyone Assets/Resources/AstarPathfindingProject/Modifiers/AlternativePath.cs(32,30): error CS0115: `AlternativePath.Apply(Path, Pathfinding.ModifierData)’ is marked as an override but no suitable method found to override Assets/Resources/AstarPathfindingProject/Modifiers/FunnelModifier.cs(355,30): error CS0115: `FunnelModifier.Apply(Path, Pathfinding.ModifierData)’ is marked as an override but no suitable method found to override What I do wrong? |
| December 27, 2011 at 09:20 #1147 | |
|
Guy Tidhar |
Both these scripts are inheriting some base class which should have an \”Apply\” function which is receiving the arguments – Path and Pathfinding.ModifierData. check out the AlternativePath and FunnelModifier classes. On the line they are defined, it should say something like this: Where I wrote \”BaseClass\”, in your code it should say something else. What is written there is the name of the class you should be looking for. Look for the \”BaseClass\” in all your code and check if it has the \”Apply(Path, Pathfinding.ModifierData)\” method defined within it. |
| December 27, 2011 at 11:22 #1148 | |
|
Aron Granberg |
I think you have some name collisions in your project. Namely, you probably have a class named either Modifier, or MonoModifier (probably the former). So the scripts think they are inheriting from your class instead of my class. See if you can find those and rename it to something else and it will go away. |
| December 27, 2011 at 15:32 #1152 | |
|
Learner |
That’s part of the reason I had to edit my source to use Pathfind.Path instead of just Path, to avoid name collisions. |
| December 27, 2011 at 20:09 #1153 | |
|
Pooh |
Well… Create new project, import Pathfinding… no errors anymore… You’re right, something in my sources… Thanks for help |
| February 4, 2012 at 11:23 #1414 | |
|
Linus |
Hi, I’m seeing similar errors even after thoroughly searching my project solution and found no Modifier, MonoModifier, IPathModifier mentioned anywhere other than in the imported A* folder. Are there other possibilities, like known package conflicts or something. I’ve tested A* in empty project and it’s awesome. Really hope someone could give some pointers. |
| February 4, 2012 at 12:33 #1415 | |
|
Linus |
Figured it out. I had a Path class which conflicts with A* Path. Probably the compiler thinks that it\’s my Path and doesn\’t recognize the prototype. |