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 rubenCatromru · Jun 03, 2013 at 12:19 AM · prefabfile-iousermodding

Load prefabs from users hard disk

Hello there.

I'm having this idea for a long time and I don't know if I can reach it. I will like to develop my videogame in final versión (.exe) with, let's say 3 playable characters, but with the optional way for the users to make other characters and including them into the game, which leads to more tan 3 characters.

The users would make a prefab of a GameObject adding the 3D model, an Animation component, scripts, etc. And then they would put the (.prefab) files in a folder like C:\Mods\ or [videogame_name]_Data\Mods\, and the game will load this prefabs and use them to grow the characters array.

So the point is how do I get to work a prefab stored in a external folder.

I'm using Unity 4.1.3f3 free. Thanks.

Comment
Add comment · Show 6
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 Benproductions1 · Jun 03, 2013 at 12:19 AM 0
Share

.Prefab files work with references. It would be a lot harder to make sure those references stay. $$anonymous$$y advice is create your own system for loading character data :)

avatar image rubenCatromru · Jun 03, 2013 at 12:29 AM 0
Share

$$anonymous$$aybe separating the objects in files ins$$anonymous$$d one (.prefab)? (first I get the 3D model eg. \$$anonymous$$ods\0\model\x.fbx, then the animations eg. \$$anonymous$$ods\0\anim\, etc). It feels more simple like you said, but I keep knowing a darn thing about how to get all these files and implementing them into the game.

avatar image Benproductions1 · Jun 03, 2013 at 01:12 AM 1
Share

It's not that easy. You need to also import all the assets referenced in the prefab. You need to make your own importer to be able to do it in builds.
Pretty much your only choice is to do it using your own system

avatar image robertbu · Jun 03, 2013 at 05:42 AM 2
Share

If you have Pro, you can use asset bundles:

http://docs.unity3d.com/Documentation/$$anonymous$$anual/AssetBundlesIntro.html

avatar image syclamoth · Jun 03, 2013 at 05:46 AM 1
Share

Asset bundles are pretty much the only practical way to do this, other than writing custom asset importers. As previously mentioned, a .prefab file does not actually contain any data- it just tells Unity how to compose an object out of different assets it already has- and, moreover, in a build all that stuff is wrapped up into an archive so can't access external files in the way you need anyway.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

16 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

Related Questions

Any way to let users create scenes or prefab in one project and load them at runtime in another? 1 Answer

Prefabs and Modding 0 Answers

Card Game like yu-gi-oh 1 Answer

Randomly pick then create prefab 2 Answers

How to prevent prefab of custom editor inspector from overriding array size. 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