Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by Max Kaufmann · Jan 06, 2010 at 09:29 PM · assetbundleasset

Can MonoBehaviours be partitioned into different assetBundles?

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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Lucas Meijer 1 · Jan 07, 2010 at 12:15 AM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Max Kaufmann · Jan 07, 2010 at 08:06 PM 0
Share

Size isn't a concern; we're trying to define a 3rd-party plugin API for our game.

avatar image
0

Answer by Gunder · Jan 07, 2010 at 01:14 PM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Max Kaufmann · Jan 07, 2010 at 08:05 PM 1
Share

Perhaps one could define an IGamePlugin interface for separate DLLs to use and then have a GamePluginHost $$anonymous$$onoBehaviour which forwards the necessary callbacks?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

How to import the object from server to unity 2 Answers

Is it sensible to build an assetbundle for each texture/mesh? 1 Answer

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Copy the file from assets and paste it out side the assets folder 0 Answers

Storing a part of a complex asset in an asset bundle 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges