Search Unity

MLAPI Camera...?

Discussion in 'Netcode for GameObjects' started by justin_kasowski, Apr 27, 2021.

  1. justin_kasowski

    justin_kasowski

    Joined:
    Jan 14, 2020
    Posts:
    45
    I've looked around on forums and tried following a guide. Not sure why I can't get this to work.

    I have a working scene, it's pretty basic but there's a shader attached to the camera. As soon as I import MLAPI it stops working (it just renders a black screen). There is only one camera in the scene and if I click it in scene view while the game is in play mode, it displays the correct frame.

    It seems like MLAPI disables the camera, but it's still showing as enabled in scene mode. I'm getting a

    Code (CSharp):
    1. OnRenderImage() possibly didn't write anything to the destination texture!
    2. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

    As always, any help is appreciated.
     
  2. luke-unity

    luke-unity

    Joined:
    Sep 30, 2020
    Posts:
    306
    MLAPI should not touch the camera at all. The message you are getting is usually related to post processing or similar scripts. Maybe try deactivating any post processing scripts on your camera and see if that works. Are you sure that there are no other errors in the console?
     
    Joe-Censored likes this.
  3. justin_kasowski

    justin_kasowski

    Joined:
    Jan 14, 2020
    Posts:
    45
    You're right, disabling the shader displays the camera normally. It's strange that it worked before adding the MLAPI package though. There aren't any other errors: upload_2021-4-27_23-15-14.png