17-07-2023, 07:08 AM
(14-07-2023, 08:13 PM)murathan Wrote: The cutting operation is not working on Android. The "RopeCutting" scene you provided as an example is also not working on Android. In the "RopeSweepCut.cs" class, I am taking the cutting start and end points from the joystick instead of the mouse point. In Unity editor, the rope is cut successfully. However, there is no interaction on the device. I have attached a sample scene. The same scene is not working on Android.
This has nothing to do with cutting/tearing: chances are the shader loaded at runtime to draw the user's swipe gesture in that sample scene isn't being included in your build, causing a null ref exception at runtime.
Unity will only automatically include in your build assets being referenced by components in your scene. So you need to include this shader manually if you wish to deploy the scene to a device since it's being loaded at runtime.
Go to Edit > Project Settings > Graphics > Always Included Shaders and include "Unlit/Color" to your list of included shaders. This should result in a proper build.
let me know if you need further help,
kind regards