#its a package script
1 messages · Page 1 of 1 (latest)
So this is someone else's code, and you think you need to modify their code to do something here?
yeah
You can't modify code that's installed by the package manager. It will get overwritten if you change it.
then what can I do?
my problem is this script creates objects open collision and I need these objects created to have a script that causes damage
but the package script doesn't know what the script that causes damage is
perhaps it offers events that get fired when collisions happen, or has ways to add your own delegates that get run when collisions happen, or something like that
what is this package?
OpenFracture
OnCompletion Callback - Trigger any behavior after the fracturing is complete, such as playing an AudioSource or executing other in-game logic.
This may be relevant.
what does it do?
i dunno, but it sounds like an event that gets fired after fracturing finishes
i'm just reading the readme
I need individual fragments to be referenced
because each one causes damage
well needs to
is there a way to move the package to assets or is that a bad idea/impossible?
you could embed the package, yes
you just copy the folder from Library/PackageCache into Packages
you can then freely edit its contents
it'll also be in the Assembly-CSharp assembly by default, as far as I know
(that's the default assembly that your code goes into)
so it will be able to see all of your types
I do this for Cinemachine. It needs to update after an inverse kinematics plugin I use
and I have to be able to edit a .meta file to change the execution order
so it has to get embedded
is that a good idea?
It does add complexity, since you need to manually replace that code if you need to update it
if you're using version control (which you should be), and the repository is public, you need to consider if you're allowed to include their code
OpenFracture is MIT licensed, so that's a non-issue
well
I tried moving the code and it didnt work
I moved this from packagecache to assets
and opened the project
but it is still placed unity packages
not in assets
I dont mind not needing to update
oh god errors..
I moved the whole folder to assets and uninstalled and now its just errors