Search Unity

Resolved Build Error: action.json removed then not found when building

Discussion in 'VR' started by Andricho, Mar 20, 2019.

Thread Status:
Not open for further replies.
  1. Andricho

    Andricho

    Joined:
    Mar 7, 2019
    Posts:
    8
    Hi!

    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 doees 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"
     
  2. Andricho

    Andricho

    Joined:
    Mar 7, 2019
    Posts:
    8
    This issue was solved by creating a whole new directory for the build.
     
    Shuaden likes this.
  3. Shuaden

    Shuaden

    Joined:
    May 2, 2019
    Posts:
    1
    Hi, having the same issue, how did you manage to make a new directory for the build?
     
  4. Andricho

    Andricho

    Joined:
    Mar 7, 2019
    Posts:
    8
    Hi, I simply created a new folder and put the whole project in there. Solved everything.
     
  5. kylestrader94

    kylestrader94

    Joined:
    Sep 18, 2018
    Posts:
    2
    I was running into the same error, I found that in order to truly bring your actions and bindings into a build you need to hit the "Replace Default Binding" in the Binding UI when you are editing your binding. Hope this helps.
     
  6. DOUAUD

    DOUAUD

    Joined:
    Sep 30, 2016
    Posts:
    5
    You save my mental health kylestrader94 !! Thx
     
Thread Status:
Not open for further replies.