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 Rosie-Posie · Oct 19, 2014 at 03:05 AM · meshprefabmaterialduplicatedependencies

How can you duplicat folders and not share old dependencies?

Hi guys!

I have a folder with some prefabs, materials, textures, FBX, etc. My Prefabs refers to FBX and Materials in this folder. Can I clone this folder in a way that it will save those local dependencies?

For example:

  • BaseFolder is located: Assets/BaseFolder

  • It contains a prefab: Assets/BaseFolder/Prefab.Prefab

  • Prefab is linked to a material: Assets/BaseFolder/Material.MAT

  • Tha material is liked to a texture: Assets/BaseFolder/Texture.TGA

Now I duplicate or clone BaseFolder and rename it CloneFolder. This is what my dependencies should look like:

  • Folder is located: Assets/CloneFolder

  • It contains a prefab: Assets/CloneFolder/Prefab.Prefab

  • Prefab is linked to material: Assets/CloneFolder/Material.MAT

  • The material likes to texture: Assets/CloneFolder/Texture.TGA

But, by default, when I dublicate folders dependencies refers to the old resources with old paths.

Here's what it looks like:

  • CloneFolder is located: Assets/CloneFolder

  • It contains a prefab: Assets/CloneFolder/Prefab.Prefab

  • Prefab is linked to a material: Assets/BaseFolder/Material.MAT

  • Tha material is liked to a texture: Assets/BaseFolder/Texture.TGA

You can see By the bolded text where the issue is. I really need my new folders to be independent.

I can do it manually in editor for every object. But I have many objects and many dependencies, and I need to automate this process.

Could there be import setting within unity to deal with importing prefabs? There are some for every other imported asset: Textures, Models, Animation, etc. Hopefully there is a graceful solution to this.

I've tried quite a few tricks, such as exporting my package and importing it. renaming FBXs and Materials, even deleting meta files and duplicating in windows rather then using Unity and nothing works.

Rosalie M.

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 Rosie-Posie · Oct 20, 2014 at 02:15 AM 0
Share

I even tried saving over files such as textures, materials, FBX's and name them differently, but the problem remains it will always know that they are old dependencies.

The reason why this is a major issue is because if someone buys two of my 3D assets packages and tries to import them both, prefabs will be referring to bad textures and $$anonymous$$eshes. I cant have such a flaw in my packages.

avatar image Rosie-Posie · Oct 21, 2014 at 01:21 PM 0
Share

So of what I understand, there must be an ID inside the prefabs and textures that gets created as soon as the object is placed into the unity folder. That ID will not change no mater what and this is what keeps those links. $$anonymous$$y question now is, is it possible to make a script that could strip that id and issue a new one to the selected items? bear in $$anonymous$$d that I have very $$anonymous$$imal knowledge in the scripting field.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by sh_code · Jan 13, 2019 at 09:22 PM

You can't. That's the point of prefabs and dependencies. They stay what they were regardless of where and how you copy or move the prefabs. That is the whole point of dependencies.

You can write an editor script which will change them, though.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Possible Unity Glitch. A few lines of code erasing prefab data. 1 Answer

Apply new complex fbx to saved prefab 0 Answers

Prefab Materials and Meshes being deleted, How can I stop this 1 Answer

duplicate a prefab then change the model? 1 Answer

Generated meshes/materials cannot be made into prefabs? 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