Author Topic: NGUI and SVN: Can they play nice?  (Read 4557 times)

sintua

  • Jr. Member
  • **
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 63
    • View Profile
NGUI and SVN: Can they play nice?
« on: November 11, 2012, 01:33:17 PM »
So I use SVN with my projects, and part of that means not including the library in the SVN; you're supposed to let it rebuild when you download a fresh copy. However, if the library is rebuilt when you use NGUI, it removes ALL references to scripts, leading to the structures in the hierarchy having "Monobehaviour" as every component name, and no script referenced in the script line below that. Obviously going through every ui element and reattaching the scripts isn't the solution, but including the library in the SVN leads to constant conflicts and corruptions as files are moved back and forth.

Is there an easier solution I don't know about?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI and SVN: Can they play nice?
« Reply #1 on: November 11, 2012, 02:04:19 PM »
Edit -> Project Settings -> Editor

Switch Version Control to "Meta Files". Don't forget to check in all the meta files along with the actual files.

This is how Unity works with all version control systems -- SVN, Git, Mecurial, etc, and has nothing to do with NGUI. :)

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: NGUI and SVN: Can they play nice?
« Reply #2 on: November 12, 2012, 02:15:22 PM »
God no, just include it in svn, and when you update you just commit the changes.

Unless you actually mess around inside the NGUI classes, you can just import on top of the old files and it will work with a UNITY restart.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: NGUI and SVN: Can they play nice?
« Reply #3 on: November 12, 2012, 02:16:11 PM »
My "god no" might be misleading - They can totally play nice, you just have to make them play nice. :D