1
votes

I'm currentlyy using unity Unity 2017.3.0f3 (64-bit) and SteamVR Unity Plugin - v2.0.

I'm trying to build my first VR-project for my HTC Vive. The problem is that when I try to build it, it removes my action.json file, then gives me an FileNotFoundException error that the action.json does not exist.

The way I'm creating the action.json is: Window > SteamVr Input > clicking yes on creating an example actions.jon file > Open binding UI > Replace Default (for my HTC vive controller) > Save and generate.

The actions.json file and a couple of other json file is thereafter succesfully builded and placed in the root of the project. But as soon as I try to build the project after, the actions.json file gets deleted and I get the following massive error messages:

[SteamVR] Actions file does not exist in project root: C:/Users/Me/Desktop/Unity Development/My Game\actions.json UnityEngine.Debug:LogErrorFormat(String, Object[]) Valve.VR.SteamVR_Input:InitializeFile(Boolean) (at Assets/SteamVR/Input/SteamVR_Input.cs:705) Valve.VR.SteamVR_Input_EditorWindow:Initialize() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:256) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:277) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:329) UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)

[SteamVR Input] Could not copy file: C:/Users/Me/Desktop/Unity Development/My Game/Assets/SteamVR/Input/ExampleJSON\bindings_holographic_controller.json to path: C:/Users/Me/Desktop/Unity Development/My Game/bindings_holographic_controller.json UnityEngine.Debug:LogError(Object) Valve.VR.SteamVR_CopyExampleInputFiles:CopyFiles(Boolean) (at Assets/SteamVR/Input/Editor/SteamVR_CopyExampleInputFiles.cs:62) Valve.VR.SteamVR_Input_EditorWindow:CopyOrClose() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:266) Valve.VR.SteamVR_Input_EditorWindow:CheckFileInitialized() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:285) Valve.VR.SteamVR_Input_EditorWindow:OnGUI() (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:329) UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)

NullReferenceException: Object reference not set to an instance of an object UnityEngine.GUILayoutUtility.LayoutFromContainer (Single w, Single h) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:182) UnityEngine.Experimental.UIElements.UIElementsUtility.EndContainerGUI () (at C:/buildslave/unity/build/Runtime/UIElements/Managed/UIElementsUtility.cs:164) UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:267) UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:330) UnityEngine.Experimental.UIElements.IMGUIContainer.DoRepaint (IStylePainter painter) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:68) UnityEngine.Experimental.UIElements.Panel.PaintSubTree (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, Matrix4x4 offset, Rect currentGlobalClip) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:532) UnityEngine.Experimental.UIElements.Panel.PaintSubTreeChildren (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, Matrix4x4 offset, Rect textureClip) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:547) UnityEngine.Experimental.UIElements.Panel.PaintSubTree (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, Matrix4x4 offset, Rect currentGlobalClip) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:536) UnityEngine.Experimental.UIElements.Panel.Repaint (UnityEngine.Event e) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:564) UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/UIElementsUtility.cs:236) UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (Int32 instanceID, IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/UIElementsUtility.cs:78) UnityEngine.GUIUtility.ProcessEvent (Int32 instanceID, IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUIUtility.cs:175)

FileNotFoundException: C:/Users/Me/Desktop/Unity Development/My Game\actions.json does not exist System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:107) System.IO.File.Copy (System.String sourceFileName, System.String destFileName) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:86) Valve.VR.SteamVR_Input_PostProcessBuild.OnPostprocessBuild (BuildTarget target, System.String pathToBuiltProject) (at Assets/SteamVR/Input/Editor/SteamVR_Input_PostProcessBuild.cs:40) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.Build.BuildPipelineInterfaces+AttributeCallbackWrapper.OnPostprocessBuild (BuildTarget target, System.String path) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:86) UnityEditor.Build.BuildPipelineInterfaces.OnBuildPostProcess (BuildTarget platform, System.String path, Boolean strict) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:324) UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)

Error building Player: FileNotFoundException: C:/Users/Me/Desktop/Unity Development/My Game\actions.json does not exist

Not sure if I provided all the information needed, so if I miss anything, please let me know and I will happy apply more information. Thanks!

1
I'm not completely sure but I tink this was a bug in versions < v2.2.0. Maybe try upgrading and check if that solves your issue. Worked for me back then. If this persists in the new version maybe open a new issue on their github page. I think you will get better support for stuff regarding steamvr there.TehMightyPotato
I tried upgrading to v.2.2.0 but the problem persists. I will try to open a new issue on their page too! Thanks for the suggestion.Andreas

1 Answers

1
votes

In my case, this was solved by making the build directory different from action.json.