Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

assorted small questions

Discussion in 'General Discussion' started by tomjoad, Apr 21, 2007.

  1. tomjoad

    tomjoad

    Joined:
    Apr 14, 2007
    Posts:
    37
    Hi~
    I've started working with Unity recently and like it a lot. I've got a few small questions:

    --versioning: how do people save versions of your projects as you are working (so if/when you screw something up you can roll back)? I am mainly thinking of saving code since that tends to change for me more frequently than the other assets.

    --JS formatting: is there a command/function in Unitron to format JS? Maybe I am lazy but I miss the autoformatting (correct indents, etc.) in the Director/Flash IDEs.

    --deleting assets: I was surprised (shocked actually) that deleting an asset through the inspector (command-delete) actually moves it to the trash. Is this the expected behavior?

    --WWW.LoadImageIntoTexture: (I may have that function name wrong). I am loading images dynamically and it all works fine but I was surprised that when I stop the project, my base (original) texture image seems permanently changed - yet if I edit the image used by the texture it is unchanged. I tried reset but the last WWW images remains. I would have thought that any changes were only at runtime and everything should revert to the state saved on disc.

    I probably have some more questions but this is long enough... ;-)
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    There have been some discussions about that around here. I just duplicate the entire project folder to another drive every day, and keep maybe a few older copies. Primitive, but sufficient for me....

    You're not limited to Unitron...you can subsitute another text editor if you'd rather. Although I kind of like it even if it's not the most advanced editor there is. (There's the "treat { and } intelligently" checkbox in preferences, but that's about as far as it goes.)

    Yep, that's expected behavior. Working with files in the Project pane is the same as working with them in Finder, the difference being that Unity keeps metadata information about them.

    Not sure about that one...haven't used that function yet.

    --Eric
     
  3. shaun

    shaun

    Joined:
    Mar 23, 2007
    Posts:
    728
    In regards to the loading of textures - I generally 'reset' the texture to the default (i.e. the one in your assets) on initializing the app.
    Unity isnt the only engine that does this - its common to cache downloaded/dynamic textures using the browser cache or some other means - annoying yes, but easy to fix ;)

    Cheers
    Shaun
     
  4. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Just create a new texture prior to overwriting its contents like this code example
    http://unity3d.com/Documentation/ScriptReference/WWW.LoadImageIntoTexture.html
     
  5. tomjoad

    tomjoad

    Joined:
    Apr 14, 2007
    Posts:
    37
    Thanks for the replies!

    I understand @ the caching reset solution now (and/or making a temp texture) - I didn't know how to do that when I posted. thanks!

    Versioning - I guess for now I'll go the route of just making a duplicate of my project folder - though my habit is to backup whenever I am about to edit some code in a major way so I can easily roll back.

    I saw some notes in the docs about the Editor being scriptable - so maybe it would be possible to write a command to back up all/selected scripts?

    hmm...occurs to me now - maybe I can duplicate a.js asset within the project hierarchy and drag it to a "backup" folder - naming it so it doesn't overwrite earlier backups. That wouldn't be bad.