Search Unity

'Namespace cannot be found' error

Discussion in 'Editor & General Support' started by lucernagame, Dec 31, 2018.

  1. lucernagame

    lucernagame

    Joined:
    Nov 5, 2018
    Posts:
    19
    I'm seeing that Unity cannot find the UnityEngine.VideoModule.dll namespaces like UnityEngine.Video.VideoPlayer when building. It can, however, find them when playing, and it appears when in Visual Studio. I added in the DLL file to the project, but when building it finds both and says it cannot build while that namespace is in conflict. So I removed it, then added the reference, but when building it again finds both and cannot build while the namespace is in conflict.

    Is there a known fix to this issue?
     
  2. lucernagame

    lucernagame

    Joined:
    Nov 5, 2018
    Posts:
    19
    After more tests, this error persists in 2017.2.0f3 Samsung TV builds through Unity reinstalls and from a clean Windows 10 reinstall. For people who are getting to this listing from a search engine because they have the same issue, please note that the issue is not solvable. I created a blank project, added 1 texture/material and added it to video player, and simply referenced the video player once, and it failed to build to Samsung but does run in the editor. Furthermore, Samsung is no longer supported by Unity so this issue will likely remain forever unfixed.

    The main stopping points during testing were the errors as follows:

    When there isn't even a call to UnityEngine.Video.VideoPlayer, but there is a reference to the DLL:
    File: Temp/StagingArea\resources\Data\Managed\UnityEngine.VideoModule.dll has not been signed and will not work with the latest Unity Launcher
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    When there is a call to UnityEngine.Video.VideoPlayer, with the reference to the DLL:
    Assets/VideoPlayerControl/VideoProgressBar.cs(9,31): error CS0234: The type or namespace name `VideoPlayer' does not exist in the namespace `UnityEngine.Video'. Are you missing an assembly reference?

    When there is a reference to the DLL copied inside the project:
    error CS1704: An assembly with the same name `UnityEngine.VideoModule' has already been imported. Consider removing one of the references or sign the assembly
    C:\Program Files\Unity\Hub\Editor\2017.2.0f3\Unity\Editor\Data\PlaybackEngines\STVPlayer/Managed/UnityEngine.VideoModule.dll (Location of the symbol related to previous error)
    Assets/DLL/UnityEngine.VideoModule.dll (Location of the symbol related to previous error)

    Abandon hope all ye who enter here as Unity is bugged (or designed) in a fundamental way as to make this seemingly simple functionality impossible.
     
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Does this occur on Android, Standalone, or iOS builds?
     
  4. lucernagame

    lucernagame

    Joined:
    Nov 5, 2018
    Posts:
    19
    No, everything works in every way for building to these ones that I've tested:

    PC, Mac, & Linux Standalone
    tvOS
    iOS
    Android
    WebGL
    Facebook / Facebook Gamesroom
    Universal Windows Platform
    Tizen

    Across multiple versions of unity (Having tested 2017.2.0f3, 2017.2.16f1, 2017.3.1f1, 2019.1.0a12). It runs in the editor without any unexpected behaviours in all versions I've tested. It also builds within Visual Studio at all points, it runs "Clean Solution" with no errors and "Build Solution" with no errors.

    For completeness, here is the MD5 of the VideoModule:

    75e9cc3708652709b089f79be56b1a99 c:/program files/unity/editor/data/managed/unityengine/unityengine.videomodule.dll

    Since Samsung is listed as not supported, being unable to build to it is reasonable. Also to note, as I've gone back and removed the video player, now I am getting:

    File: Temp/StagingArea\resources\Data\Managed\UnityEngine.UIModule.dll has not been signed and will not work with the latest Unity Launcher
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    So I imagine that I can't build anything to Samsung with my current environment. I'll have to start up another new Windows 10 VM to see if me switching between versions has done something to the DLLs.