Exporting packages with inherited dependencies

We’ve been exporting packages from one project and importing them into another, and noticed that if a prefab has a script that inherits from a base class, the script containing the base class isn’t included in the dependencies.

Is this expected behavior, or something that might have just been overlooked?

would say expected as class inheritance has nothing to do with the meta data.
the relation resolution for the package include etc is targeted on the meta data and asset relation ships, so those things that must be managed with all links by unity or will just be lost.

Class inheritance on the other side is handled by Mono at compilation. Unity does not really care about it. It only is interested if it is a monobehaviour or not in case you want to drag it onto a go

Yeah that makes sense, and I can understand why Unity would only look to the immediate script requirements, although the fact that the attached script only works if it’s base class is available would imply it is dependent on the base class script.

Splitting hairs on semantics there really, but should I lodge it as a bug or a feature request? I really think if a script doesn’t work because it inherits from another script, that it really is a dependent asset and should be included in an export.

So…13 years later…any fixes or workarounds? I’m writing an FTP exporter so i can export scenes to other people on the team and it’d be really nice if i didn’t have to get messages later saying “There’s errors, the scene doesn’t work” then have to go thru each one, find the script dependencies and send a whole other package, possibly with further errors of missing dependency references.