error CS1061: 'object' does not contain a definition for 'type' and no accessible extension method 'type'



  • Hello,

    I recently got SWS from the store and I tried to install it in my project, but after the installation I've been getting a bunch of errors from moveEditor.cs, WaypointEditor.cs and PathEditor.cs. They seem to be object oriented.

    • Here's one of the errors in text - "\PathEditor.cs(303,39): error CS1061: 'object' does not contain a definition for 'type' and no accessible extension method 'type' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)"

    • Here's a screenshot of the console - https://i.imgur.com/oJljMUn.png

    • Preview of the code

    I use Unity 2019.4.10 with Visual Studio.

    Any help would be highly appreciated :'))



  • Hello,

    since you are referring to Event.current in code, here is the scripting reference on 'Event':

    https://docs.unity3d.com/ScriptReference/Event.html

    'Event' has a type variable, Use method and the other stuff mentioned in the errors. Have you tried importing SWS in a new project? I assume that in your project, you have another script named Event or Object.

    I removed your second screenshot as sharing unmodified code of SWS is not allowed.


Log in to reply