Search Unity

webcamtexture.GetNativeTexturePtr other pointer types?

Discussion in 'Documentation' started by idunnuhow, Jan 17, 2017.

  1. idunnuhow

    idunnuhow

    Joined:
    Apr 16, 2014
    Posts:
    23
    I want to get a byte pointer or an unsigned char pointer of a image from a webcam on a PC.
    I can only find GetNativeTexturePtr which returns a IntPtr, is there a way to get the pointer as an unsigned char or byte pointer?
    Is the format of the image IntPtr from GetNativeTexturePtr RGBA32bit?
    How can I get the IntPtr as a BGR24bit format?
    How can i cast the IntPtr to a byte pointer?
     
  2. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Probably not something that is a good Documentation issue. Probably more useful using the Editor & General Support section. There is also a Graphics Experimental Previews forum but maybe not covering your issue.