Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to convert CreateExternalTexture into Unity Texture2D

Discussion in 'AR' started by BinaryBanana, Feb 16, 2018.

  1. BinaryBanana

    BinaryBanana

    Joined:
    Mar 17, 2014
    Posts:
    81
    Hi,
    I am trying to do some image processing but the texture I am getting from UnityARVideo (VideoTextureY) is external and so I can't access pixels (GetRawTextureData returns nothing). I think I should be able to load it with Marshal.Copy and Native pointer from that external texture but it doesn't work. I think I tried everything and it would be great to get some new ideas.

    Overall goal is to get an access to Texture2D from ARKit screen video so I can do image processing. I would like to avoid a solution with additional camera and render texture.

    Thanks!
     
  2. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
  3. jimmya

    jimmya

    Joined:
    Nov 15, 2016
    Posts:
    793