• 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
1
Question by sharat · Jul 01, 2011 at 10:23 PM · importupdateassetlink

Updating assets changes .meta files and breaks dependencies.

[UPDATE] I experimented and found out that the problem was caused by the .meta files changing what ID number it assigns to the root node. I'm guessing that means that this problem only applies to people using external version control? We'll be changing to the Unity Asset Server soon, and can try testing to see if this is still a problem.

We noticed a problem where when we updated an asset by reexporting the FBX from Max, that all the links to that object were broken. Is there a way around this?

I'm not sure if this is related or not, but we had to change the material generation method to be "per material" in order for the materials to update properly.

Here's a more detailed explanation of how the asset is linked. I have an Asset A, which is just sitting in some asset folder. I then create a Prefab P. I attach a script component S to P where S has a public GameObject member called AssetTemplate. I then go and link the asset A to AssetTemplate under the prefab and everything works fine. However once I make a change to Asset A, all of a sudden AssetTemplate under the prefab is now pointing to "Missing".

Comment
Add comment · Show 4
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 sharat · Jul 06, 2011 at 02:20 PM 0
Share

To clarify, I'm referring to the dependencies in prefabs that are linked to the asset.

avatar image Waz · Jul 06, 2011 at 10:50 PM 0
Share

by "broken", do you mean meshes that previously referred to the imported model become "$$anonymous$$issing" in the inspector? That should only happen if the model mesh names change.

avatar image sharat · Jul 08, 2011 at 05:06 PM 0
Share

I have a script in a prefab that attaches a GameObject(as specified in a link) to the object. That link was set to the the asset. When the asset got updated, the GameObject link was changed to "$$anonymous$$issing".

avatar image cregox · May 17, 2012 at 02:54 PM 0
Share

@sharat, the way those Q&A sites work is you edit questions or answers only to add relevant information to the question or to the answer, and not to add an actual answer inside the question, if you know what I mean. Your edit should've been an answer. And it's ok - even encouraged - to answer your own questions. ;-)

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Borgo · Jul 08, 2011 at 05:21 PM

When you attach a script to the object, this object lost its link to the prefab (you can apply the altered settings to prefab) and lost its link with FBX "Tree".

So, when you make any change to model, in your 3D application, and Unity reimport this model, it will apply the mesh modifications, but if you add or delete any mesh in the FBX it will not apply this change to your object, because he lost its link.

There's no way to prevent this, what I do is to add the scripts By scripts while testing, and lastly attach the scripts directly to the object when finish.

Sorry for my bad gramar. Hope can help you. Borgo

Comment
Add comment · Show 1 · 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 sharat · Jul 08, 2011 at 06:11 PM 0
Share

The thing is that all of this is done within prefabs. The prefab itself is instantiated at runtime where it looks up the asset I specified and adds it to the scene with it.

Here's the scenario. I have an Asset A, which is just sitting in some asset folder. I then create a Prefab P. I attach a script component S to P where S has a public GameObject member called AssetTemplate. I then go and link the asset A to AssetTemplate under the prefab and everything works fine. However once I make a change to Asset A, all of a sudden AssetTemplate under the prefab is now pointing to "$$anonymous$$issing".

All of this is done outside of a scene, this is just changing the prefab relations.

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Asset: Update an asset 1 Answer

Animations lose their links upon updating from Asset Server -2 Answers

how to open FPS tutorial complete 1 Answer

Getting at raw imported audio data via AssetDatabase. 1 Answer

Problem importing .PSD file 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges