Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi Rope Cutting, Android device
#1
The rope cutting operation works in Unity, but it doesn't work on Android devices. Can you help me with this?
Reply
#2
(14-07-2023, 05:05 PM)murathan Wrote: The rope cutting operation works in Unity, but it doesn't work on Android devices. Can you help me with this?

Hi!

I guess you’re referring to rope tearing right? I just tested on Android and it works fine (tearing code is the same for all platforms)

Could you be a bit more specific? Is this some scene you’ve done which has any custom scripts to trigger tearing?

cheers,
Reply
#3
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.
[Image: ezgif-com-video-to-gif.gif]
Reply
#4
(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.
[Image: ezgif-com-video-to-gif.gif]

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
Reply