#its a package script

1 messages · Page 1 of 1 (latest)

orchid zinc
#

So this is someone else's code, and you think you need to modify their code to do something here?

fresh gale
#

yeah

orchid zinc
#

You can't modify code that's installed by the package manager. It will get overwritten if you change it.

fresh gale
#

then what can I do?

orchid zinc
#

explain your actual problem

#

not your attempted solution

fresh gale
#

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

orchid zinc
#

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?

fresh gale
#

OpenFracture

orchid zinc
#

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.

fresh gale
#

what does it do?

orchid zinc
#

i dunno, but it sounds like an event that gets fired after fracturing finishes

#

i'm just reading the readme

fresh gale
#

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?

orchid zinc
#

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

fresh gale
#

is that a good idea?

orchid zinc
#

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

fresh gale
#

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

fresh gale
#

oh god errors..

#

I moved the whole folder to assets and uninstalled and now its just errors

orchid zinc
#

Put it in your Packages folder, not Assets.

#

Unity will still understand that it's a package (just one that's included directly in your project)

#

not sure about the source of those errors, though