preface
Unity reports an error when playing the video: got null handle from idxgiresource:: getsharedhandle, which shows that the running program cannot play the video, but the sound can be heard. This problem is likely to be related to AMD’s unique display. If this error occurs, you can try the following solutions.
This solution takes the windows
platform as an example, and other platform solutions are similar.
Solution
First of all, ensure the normal operation of the computer amd display driver, and ensure that unity automatically calls amd display. (if unity does not automatically call amd graphics card, you can add unity program at amd graphics card control panel.)
Open Edit - project settings
in unity, select player
, select PC
platform, uncheck auto graphics APIs for windows
in the options of other settings
, and add Vulkan
at graphics APIs for windows
below the options, Delete or adjust the default direct3d11
to Vulkan
, as shown in the following figure. After adjustment, you will be prompted to restart the unity editor. You can restart it. If you try to run again, you will not report an error.