How to change/modify XR-Scripts?

Hey everyone,

I am currently working with SenseGloves at work and because some scripts provided from them are not as good/functional as the ones from Unity directly I tried to modify the Unity-Scripts to work together with the Gloves.
But as soon as I change and save the XR-Scripts, for example the XR Grab Interactable Script, I get an Error Message in the console and the script resets to its original state. When I looked into it, I realized, that Unity has temp files and when they dont match up, they got generated anew.

tldr: is there a way to change the XR-Scripts without them resetting after saving?

Thanks for an answer!

You are modifying files in a package that is managed by Unity. You cannot directly modify those scripts easily and I don’t recommend that you try to. You should inherit from the scripts in the package to add your own custom behavior.

1 Like

What @DejaMooGames said is correct. Packaged scripts are not directly modifiable by design. Extending and overriding the specific functionality needed was the ultimate goal with this toolkit. If there is something that needs additional exposure to override/modify/use, please let us know through the Report a Bug link under Help in the Editor and then our team can take action on that and get the enhancements into a future release.