Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Playmaker not working in Unity 2021, 51 errors after fixing 1 error CS0535

Discussion in 'Assets and Asset Store' started by YsoSiris, Jan 31, 2023.

  1. YsoSiris

    YsoSiris

    Joined:
    Jan 7, 2022
    Posts:
    16
    I have read a lot forums and posts all over google on error CS0535, I may have missed a simple answer, so pardon my tardiness if so, I been using playmaker for the last year almost and love it, I recently downloaded Devdog (the old InventoryPro) for the Inventory setup and all was well, then out the blue, playmaker posted 22 errors, I attempted to fix them, I got down to the last one and once I fixed it, 33-51 more errors appeared, I attempted to fix them, got them down to last one and it seems like i have been repeating the process over and over.....I have deleted Playmaker from all the files in library they said to do, I feel like i lost all my data and my FSM presets i had for my movements and etc...

    Appreciate any advice..

    This is what the code says in the 1st error, after the 1st error CS0535 was fixed (so I thought it was fixed) and then about 30+ more errors appeared relating to Playmaker.

    First error CS0535 when loading up Playmaker (paid from assest store version 1.9.4-1.9.6)

    Assets/PlayMaker/Actions/UI/Components/PlayMakerCanvasRaycastFilterProxy.cs(7,70): error CS0535: 'PlayMakerCanvasRaycastFilterProxy' does not implement interface member 'ICanvasRaycastFilter.IsRaycastLocationValid(Vector2, Camera)'

    Code (CSharp):
    1. #if !PLAYMAKER_NO_UI
    2. using UnityEngine;
    3. namespace HutongGames.PlayMaker
    4. {
    5.     public class PlayMakerCanvasRaycastFilterProxy : MonoBehaviour , ICanvasRaycastFilter
    6.     {
    7.         public bool RayCastingEnabled = true;
    8.         #region ICanvasRaycastFilter implementation
    9.         public bool IsRaycastLocationValid (Vector2 sp, Camera eventCamera)
    10.         {
    11.             return RayCastingEnabled;
    12.         }
    13.         #endregion
    14.     }
    15. }
    16. #endif
     

    Attached Files:

  2. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,617
    From the error logs, it looks like you might have a script somewhere that redefines "Camera" in the global namespace. This would wreak all sorts of havoc in a project!

    Did you download or add any scripts recently? You can use Visual Studio to search for "public class Camera". If you find the script you can either delete it if you're not using it, or put it in a namespace so it doesn't conflict with UnityEngine.Camera.

    Hope this helps. You can also contact us at info at hutonggames.com.
     
    YsoSiris likes this.
  3. YsoSiris

    YsoSiris

    Joined:
    Jan 7, 2022
    Posts:
    16

    Hey thanks so much for the reply, before i go deleting files, I wanted to see if you could monitor what came up when I searched Public Class Camera, not sure what is being used, I know I downloaded the ootii camera controller few days ago, had problems setting up the aim.....can you see what I should delete please, appreciate it, wish there was a Tip Jar, I would look out, I really need my playmaker back running.
     

    Attached Files:

  4. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,617
    The first result looks suspicious. If you open the file is there a namespace used? Look for the keyword “namespace” above the class name. If you’re not using that script I would try deleting that one.
     
  5. YsoSiris

    YsoSiris

    Joined:
    Jan 7, 2022
    Posts:
    16

    Found a few, yet still not sue which one to delete in fear of tearing the system up.....which one should I delete, i'm using the Ootii Camera and that was loaded up earlier and gave no problems...

    I sent the namespace you said find as well as the Public Class with it.....

    namespace UnitySampleAssetsModified Camera2DFollow
    namespace UnityEditor.Recorder.Input Camera360InputSettings : ImageInputSettings
    namespace com.ootii.Cameras CameraController : BaseCameraRig
    namespace com.ootii.Cameras CameraControllerEditor : UnityEditor.Editor
    namespace com.ootii.Cameras CameraControllerEditorSymbol : UnityEditor.Editor
    namespace com.ootii.Cameras CameraMessage : Message
    namespace UnityEditor.Recorder.Input CameraInput : BaseRenderTextureInput
    namespace UnityEditor.Recorder.Input CameraInputSettings : StandardImageInputSettings
    namespace UnityStandardAssets.Utility CameraRefocus
    namespace UnityEditor.Rendering.LookDev CameraState : ICameraUpdater
    namespace UnityEngine.Rendering CameraSwitcher : MonoBehaviour
     
  6. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,617
    To be safe, you should make a copy of the project and try deleting the script in the copy. The first script you listed previously (INCar/Scripts/Camera.cs) is likely the culprit. You're looking for a class with the exact name "Camera" *without* a namespace (which means it's defined in the global namespace and conflicting with UnityEngine.Camera).
     
    YsoSiris likes this.
  7. YsoSiris

    YsoSiris

    Joined:
    Jan 7, 2022
    Posts:
    16

    Much Appreciation, I was able to delete files not in use, then redownloaded playmaker, corrected a few small mistakes and I was back in action.....Thanks a lot, your help was better than a google search.....Peace and Blessings to you
     
    Alex-Chouls likes this.