Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 /
This question was closed Oct 15, 2015 at 02:15 AM by DaiMangouDev.
avatar image
1
Question by DaiMangouDev · Jul 09, 2015 at 09:55 AM · c#editorassetdatabase

How do I access assets of an asset database .asset file via c# ?

hi, as you know assetddatabases can hold multiple assets as SubAssets. How do I go about accessing and returning thee assets inside of the assetdatabase to a list ?

Here ia an example of my custom .asset file.

Where New Comp typeof (Comp) is a subasset of CompPtoject typeof (CompProject) alt text

comp.jpg (9.0 kB)
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

1 Reply

  • Sort: 
avatar image
1
Best Answer Wiki

Answer by Nischo · Jul 09, 2015 at 10:16 AM

If you have a reference to your asset, or if you have stored in in your Resources Folder and have loaded it via Resources.Load: You can access all "subassets" inside via AssetDatabase.LoadAllAssetsAtPath the array of objects return contain your "container" asset and all child assets.

Comment
Add comment · Show 4 · 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 DaiMangouDev · Jul 09, 2015 at 12:24 PM 0
Share

Thanks !!, I'm unable to even access ANY Load function in AssetBundle.

alt text

alt text tried with a new project too; had the same problem.

could it be that I need to have Unity pro in order to access the Load functions .

i wonder how else can i get this done

comp4.jpg (21.9 kB)
comp3.jpg (5.8 kB)
avatar image Nischo · Jul 09, 2015 at 02:04 PM 0
Share

Never really worked with AssetBundles. But you are trying to call a static method on the class AssetBundle. $$anonymous$$y guess is, you have to load the asset file first, cast it to the class AssetBundle and then call LoadAsset on that instance. Again, this is only a guess.

avatar image Nischo · Jul 09, 2015 at 02:22 PM 0
Share

$$anonymous$$y Bad, i think i understand now what you were doing, and it has nothing to do with AssetBundles. Give me a moment and i will update my answer.

avatar image DaiMangouDev · Jul 09, 2015 at 04:31 PM 0
Share

no problem ,thanks , I look forward to the new info

Follow this Question

Answers Answers and Comments

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

How to : Editor.OnPreviewGUI Implementation 0 Answers

How do I change the default icon of a .asset file ? 1 Answer

Initialising List array for use in a custom Editor 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