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
0
Question by LKIM · Apr 13, 2011 at 06:42 PM · assetbundleassetsruntimebuildassetbundle

Asset creator in Unity

Hi All, I'm trying to create an app which will enable users to create assets on the fly. To do this, I need to provide the user with some default assets which come packaged with the app, but then also allow them to create and save out new ones which are loaded at run time.

In order to load resources at run-time, it seems that I need to be using AssetBundles, but from what I can tell, the ability to create new AssetBundles is part of UnityEditor and not UnityEngine, and as such cannot be done without making a call to the Unity.exe -batch mode.

The other code I found that deals with creating assets is to call AssetDatabase.SaveAssets, but that seems to be an editor call as well.

Is there a way to do what I'm trying to do? Can I just load new resources off the file system once I'm compiled?

Thanks, Liron

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
3
Best Answer

Answer by yoyo · Apr 13, 2011 at 07:27 PM

You can't save assets from Unity in the way you want. As you've discovered, these are editor functions, not engine functions.

What you could do instead is find a way to save assets in a form for which you can write a loader. For example, if you have a .jpg image you can load it into a Texture2D. For 3D models, you could write out the vertices, edges, etc. and then construct a Mesh on the fly from the this data.

Comment
Add comment · Show 3 · 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 DaveA · Apr 13, 2011 at 08:04 PM 1
Share

I'm working on an X3D export/import component for just this type of thing, could use some help.

avatar image LKIM · Apr 13, 2011 at 09:30 PM 0
Share

Can we include the editor as a plugin?

avatar image yoyo · Apr 13, 2011 at 11:12 PM 0
Share

No, it wouldn't work as a plugin, and I don't expect Unity would let you bundle it anyway. Though I suppose you could get your users to download the free version and create assets with it.

avatar image
0

Answer by LKIM · Aug 22, 2011 at 05:09 PM

The way we ended up solving this is by having a default mesh which we imported into unity and then writing out the deltas for each vertex as a text file. We then load in the text file, read the deltas and apply them to each vertex.

Comment
Add comment · 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

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

1 Person is following this question.

avatar image

Related Questions

How can I display an Asset Store within game? 0 Answers

Can I set an Asset as Addressable at Runtime? 0 Answers

Loading assets for a level from asset bundle 1 Answer

Addressable Assets integer Addresses? 0 Answers

Load Assetbundles all at once. 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