|
It seems that all my code gets compiled into a single DLL which is included in the root Unity3D file, and that only art assets can be partitioned. Is there a way to target specific MonoBehaviours to go with specific files to delay loading them until their scene is loaded?
(comments are locked)
|
|
Not easily. If you keep your code "away from unity", in a seperate dll, you can download that with the WWW class, and use something like Assembly.LoadFromBytes() to load it in. however, that's defenitely swimming upstream. While the ability to spread monobehaviours over different assetbundle would be nice, filesize and loading time is usually not a great concern, as cmopiled code tends to be a lot smaller than your assets most of the time. Size isn't a concern; we're trying to define a 3rd-party plugin API for our game.
Jan 07 '10 at 08:06 PM
Max Kaufmann
(comments are locked)
|
|
I think Assembly.Load not be used to 'export' Assembly MonoBehaviours because each uses its own namespace, so you can not load a class that derives from MonoBehaviours from the dll to be used as a component. I wish there was a solution. Perhaps one could define an IGamePlugin interface for separate DLLs to use and then have a GamePluginHost MonoBehaviour which forwards the necessary callbacks?
Jan 07 '10 at 08:05 PM
Max Kaufmann
(comments are locked)
|
