-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Versions: Unity 2022.3.19f1, Runtime Transform Handle 0.1.4
Platform: Windows 10
Disclaimer: I managed to resolve this issue, but wanted to document it. It may be fruitful to add a little note to the readme.md in case others run into the same problem.
Expected behavior: Handles should appear when manipulating objects in a windows build.
Actual behavior: Handles do not appear in the scene when building for Windows. The following error message is displayed in the console:
ArgumentNullException: Value cannot be null.
Parameter name: shader
at (wrapper managed-to-native) UnityEngine.Material.CreateWithShader(UnityEngine.Material,UnityEngine.Shader)
at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00008] in <ab14d35a27c043688812ae199c64b5aa>:0
at RuntimeHandle.HandleBase.InitializeMaterial () [0x0000b] in <2f416ef01dc943199267b54df4d7efdb>:0
at RuntimeHandle.PositionAxis.Initialize (RuntimeHandle.RuntimeTransformHandle p_runtimeHandle, UnityEngine.Vector3 p_axis, UnityEngine.Color p_color) [0x00015] in <2f416ef01dc943199267b54df4d7efdb>:0
at RuntimeHandle.PositionHandle.Initialize (RuntimeHandle.RuntimeTransformHandle p_runtimeHandle) [0x00080] in <2f416ef01dc943199267b54df4d7efdb>:0
at RuntimeHandle.RuntimeTransformHandle.CreateHandles () [0x00026] in <2f416ef01dc943199267b54df4d7efdb>:0
at RuntimeHandle.RuntimeTransformHandle.Update () [0x00070] in <2f416ef01dc943199267b54df4d7efdb>:0
Resolution: The issue was resolved by including the "sHTiF/HandleShader" and the "sHTiF/AdvancedHandleShader" in the "Always Included Shaders" list in the Graphics Settings.
Steps to reproduce:
- Create a new Unity project.
- Import the RuntimeTransformHandle package from the GitHub repository.
- Add the handles to an object in the scene view.
- Build the project for Windows.
- Observe that the handles do not appear in the scene view and the error message is displayed in the console.
Additional information: The issue was only observed when building for Windows. The handles worked correctly in the editor and when building for other platforms.