Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

reimport functionality work?

Discussion in 'iOS and tvOS' started by sohambliss, Aug 31, 2009.

  1. sohambliss

    sohambliss

    Joined:
    Jul 7, 2009
    Posts:
    10
    i have tried to use the "reimport" function to reimport textures and models and it doesn't seem to work.

    let's say i have a texture in my assets of a unity project. i work on that texture in photoshop and resave it (same relative path) and then 'reimport' in unity, expecting to see the new texture and...nothing happens.

    does 'reimport' work and if so, how do i use it?

    i am left with deleting the asset and 'importing new asset' again which is fine but 'reimport' would be nice if i knew how to use it.
     
  2. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    As far as i know, unity automatically uploads all the assets you have modified :S
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    right, assets are replaced automatically when altered, given the file type is understood.
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    Reimport is only for those cases where something gets messed up with the project and you need to force it to import again. Normally you don't need to use it for anything.

    --Eric
     
  5. sohambliss

    sohambliss

    Joined:
    Jul 7, 2009
    Posts:
    10
    thanks for the replies. my experience does not seem to be the same as i update assets and then reopen unity and i must delete the old version of the asset and reimport the new one.

    unless i am mistaken i have never seen unity have the new version of the asset without manually reloading it. i have lived with this the duration of the project so its not a big deal.

    i will keep an eye out for the way unity is supposed to work in case i have been missing something.

    thanks again.
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    is the texture assigned to a material and is an object with it in view so you can check if it updates or not? :)

    Also are you outside of game mode, as during game mode, nothing is updated on the asset end.
     
  7. sohambliss

    sohambliss

    Joined:
    Jul 7, 2009
    Posts:
    10
    the texture is assigned to an object. is that separate from assigning it to a material?

    i am in editor mode when i try to reimport assets.

    it is also that unity will be off, i work in photoshop or something, update the textures. open up unity and unity reflects the old texture until i delete it and reload it manually.

    i have also tried 'refresh' and i can't seem to tell what it does either.
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    a texture assigned to an object always means a material :) Textures can not be applied to object directly.


    I would guess that settings on your system prevent the files from correctly writting or reading the last change date and without that, assets basically are never update out of the systems view.
     
  9. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    213
    Slightly old post I know..

    But this is an annoying bug.

    The 'reimport' button does nothing in my experience.

    Currently I'm trying to create a texture in Photoshop in Windows.

    I have the texture (PSD) applied to a model in unity, and can see it on the screen. I update the texture in Photoshop, save it, then in Unity clicking 'reimport' does nothing. As the OP stated, I must delete the asset from Unity, import it again from the Assets menu, and reapply it to the model in question.

    Was this fixed in 2.6 by any chance? I'm still on 2.5 atm.
     
  10. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    The bug doesn't seem to have been reported - could one of you do that? (You may be asked to send the misbehaving project or asset files.)

    Also, if you're opening the files directly in Photoshop from the desktop or Open Recent, then try opening them within the Unity project. I think Unity only tracks changes to files opened like this.
     
  11. schplurg

    schplurg

    Joined:
    Mar 21, 2009
    Posts:
    208
    This happened to me in the past when I initially imported the asset from outside the Project Assets folder.

    Could it be that you are editing a version that is not in the Assets path? Sorry if that is a dumb question. I just can't imagine what else it could be.

    If I double-click my asset within the Project window (opening it in Photoshop) then save it, it gets updated in my scene. Also, copy/pasting my texture into my asset folder via Finder will also update correctly.
     
  12. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    To fully grasp this:
    For assets to reimport/refresh correctly and reflect the changes made to them outside Unity (e.g. with Maya or Photoshop) the file I need to modify is the asset at the asset path in the project view?

    This is how I normally work:
    1. Unity project on D:\Project\Unityfiles
    2. Working files for assets somewhere else i.e. on D:\Project\Assetfiles
    3. Create, save and modify assets (fbx, psd, tga, dds etc.) at 2.
    4. Import those assets into the Unity project at 1.

    And if I get what you are saying, Unity does not store the initial location to the asset upon first import?
    Instead Unity merely copies the asset into its project folder structure.
    And if future-me does not update the copy Unity will not know that the asset has been changed?

    I can see where this comes in handy. Having a team work on the same project would require all team members to have the same harddrive and folder structure as the one who initially imported an asset.
    But as most teams use some kind of subversion system I guess that should be configurable, no? Would be great to have this feature.
     
  13. davidsirmons

    davidsirmons

    Joined:
    Mar 16, 2014
    Posts:
    190
    Hmm. Hopefully the banding that is afflicting every last 2d item in my entire game won't have to be hand-reimported. That would be the last straw for this engine.
     
  14. Foo-Byte

    Foo-Byte

    Joined:
    Jun 26, 2015
    Posts:
    12
    Wow this is an old thread. I found it wondering, "why doesn't Reimport update my textures?". I, too, edit my images in a separate path from the Unity project they will be used in. So, it might make sense that Unity doesn't automatically see changes to them, but if I click "Reimport" I would really expect Unity to reimport them from their original place -- not just look in its own Assets folder.

    This makes me want to use placeholder art until everything is finished. Or split all my art up into individual images instead of using an atlas because redefining EVERYTHING that came from that atlas that I had to delete and re-import is going to ... well, "be time consuming" is the polite way of putting it.
     
  15. Foo-Byte

    Foo-Byte

    Joined:
    Jun 26, 2015
    Posts:
    12
    I missed the obvious solution; manually copy the updated artwork from the external directory to Unity's Assets directory, replacing the copy in there. Next time I launched Unity, it saw the updates. No need to reimport or re-slice the image. Whew!
     
  16. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Yep, that's how we work, too. For some time I was even experimenting with a script that monitored any of my raw ressources. And if it detected a change it would copy it to the Unity Project path.
    But it was cumbersome to maintain a quick workflow including several dozen folders - the script needed to know where one file came from and where it belonged to. Reconfiguring took longer than simple copy'n paste.