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 joelfivat · Jan 07, 2014 at 09:27 AM · prefabassetdynamiceditor extension

Editor : dynamic asset creation and prefabs, best practice ?

Hello,

I am creating an editor extension (a voxel editor for creating models).

There is a lot of dynamic assets creation involved (texture, mesh, material, data)

I've managed to overcome most of the problems working with the editor using a lot of googling, and it is basically working, but I don't know if I handle asset creation the right way.

 Model creation :

     - create data asset (scriptable object stored in a .asset file)
     - create mesh asset (mesh object stored in a .asset file)
     - create texture asset (texture .png)
     - create material asset (material .mat)

 Start editing model :

     - duplicate existing data asset (new .asset file)
     - duplicate existing mesh asset (new .asset file)
     - duplicate existing texture asset (new .png file)
     - duplicate existing material asset (new .mat file)

Now, I guess you are asking : why duplicate assets every time ?

If the user creates a prefab with the voxel model, and edit an instance of the prefab, we need separate data or all prefab instances will be updated, even if the user never click "Apply".

Of course because of that, every time we start editing a model a lot of slow IO takes place. Also a lot of unused asset files might be generated.

Is there a better way to handle dynamic asset file creation / prefab generation ?

I know prefab need physical asset files to retain the link when the prefab is created, but gameobjects do not. Is there a way to generate the files only when the prefab is created by the user ?

Thanks a lot for your time

Comment
Add comment · Show 2
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 HappyMoo · Jan 07, 2014 at 10:15 AM 0
Share

I'm not sure this is the right place. This sounds more like something that can be discussed in the forum. I'm also doing dynamic mesh generation and would love to discuss this, but I feel this is not the right format here. Would you $$anonymous$$d moving this to the forums and linking to the thread here?

avatar image joelfivat · Jan 07, 2014 at 10:49 AM 0
Share

ok, reposted in the scripting forum http://forum.unity3d.com/threads/221263-Editor-dynamic-asset-creation-and-prefabs-best-practice?p=1475464#post1475464

1 Reply

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

Answer by joelfivat · Jan 14, 2014 at 03:06 PM

I have my answer : my voxel data should not be considered as a an attribute of the prefab but as the model as a whole. Instead, I will provide a "Clone" button to duplicate all the model assets.

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

19 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

Related Questions

Level Editor in Unity as Editor Extension 1 Answer

Save changes (delta) made to prefab in editor as serialized data and apply it later in runtime. 1 Answer

Dressing Room 0 Answers

Adding audio to asset bugs out the movement 1 Answer

Why do my prefabs not have an Asset Preview? 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