Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Build error - DirectoryNotFoundException: Could not find a part of the path

Discussion in 'Editor & General Support' started by unity_lgPxW1cIGK8_nw, Mar 2, 2022.

  1. unity_lgPxW1cIGK8_nw

    unity_lgPxW1cIGK8_nw

    Joined:
    Nov 26, 2020
    Posts:
    3
    Hello,
    I am unable to build my project in Unity (PC version) due to this error. Can someone please help me resolve this.

    DirectoryNotFoundException: Could not find a part of the path "Assets\StreamingAssets\VR Controllers Models\Oculus Controllers\oculus_cv1_controller_left\Materials\external_controller01_col.mat" or "Temp\StagingArea\Data\StreamingAssets\VR Controllers Models\Oculus Controllers\oculus_cv1_controller_left\Materials\external_controller01_col.mat"

    Thank you!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,769
    You neglected to state whether the file above actually exists in your project.

    This also seems odd to be accessing a Unity file (a .mat file) but doing so in the StreamingAssets folder.

    Did you set the project up this way? StreamingAssets is for binary non-Unity stuff.

    I'm not even sure that is actually even a possible thing because how would you turn the .mat file (which is YAML) into an actual Material at runtime...
     
  3. unity_lgPxW1cIGK8_nw

    unity_lgPxW1cIGK8_nw

    Joined:
    Nov 26, 2020
    Posts:
    3
    The file is missing in the Temp..... path. It is there in the Streaming Assets path.