fmod / fmod-for-unity

FMOD Studio integration with Unity.
https://fmod.com/resources/documentation-unity
MIT License
181 stars 38 forks source link

Unity Console spamming: "ArgumentException: The specified path is not of a legal form (empty)" #30

Closed CyberStarLight closed 4 years ago

CyberStarLight commented 4 years ago

I looked this issue up in google and found no help, so I'm posting here.

I'm using the latest version of unity: 2019.2.17f1 And latest version of FMOD unity plugin: 2.00.06 Visual studio version: Microsoft Visual Studio Community 2019, Version 16.4.2

I create a new Empty unity project, install the plugin, Add an FMOD project folder. I add a single script to an empty scene:

public class TestFMOD : MonoBehaviour
{
    private EventInstance audio;

    void Start()
    {
        audio = FMODUnity.RuntimeManager.CreateInstance("event:/Level1/Music1"); 
        audio.start();
    }
}

When I ran the scene, the music plays with no issues, but the console keep spamming hundreds of this error message, this makes it impossible for me to locate actual errors in my own code as they get swallowed by this immediately:

ArgumentException: The specified path is not of a legal form (empty).
System.IO.Path.InsecureGetFullPath (System.String path) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.IO.Path.GetFullPathInternal (System.String path) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.IO.FileInfo.Init (System.String fileName, System.Boolean checkHost) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.IO.FileInfo..ctor (System.String fileName) (at <567df3e0919241ba98db88bec4c6696f>:0)
(wrapper remoting-invoke-with-check) System.IO.FileInfo..ctor(string)
UnityEditor.VisualStudioIntegration.SolutionSynchronizer.ShouldSyncOnReimportedAsset (System.String asset) (at C:/buildslave/unity/build/Editor/Mono/VisualStudioIntegration/SolutionSynchronizer.cs:224)
System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
UnityEditor.VisualStudioIntegration.SolutionSynchronizer.SyncIfNeeded (System.Collections.Generic.IEnumerable`1[T] affectedFiles, System.Collections.Generic.IEnumerable`1[T] reimportedFiles) (at C:/buildslave/unity/build/Editor/Mono/VisualStudioIntegration/SolutionSynchronizer.cs:213)
UnityEditor.SyncVS.PostprocessSyncProject (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at C:/buildslave/unity/build/Editor/Mono/SyncProject.cs:165)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:159)
UnityEditor.AssetDatabase:SaveAssets()
FMODUnity.EventManager:CopyToStreamingAssets() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:584)
FMODUnity.EventManager:RefreshBanks() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:37)
FMODUnity.EventManager:Update() (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:656)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:303)

Am I doing something wrong or is this a bug?

fmod-cameron commented 4 years ago

This issue has already been fixed for the next release: https://github.com/fmod/UnityIntegration/commit/fd6e3065520ec4383229ca3ba20f3ac38ab9bc59