Support > NGUI 3 Support

NGUI3.0.5 confuses perforce source control

<< < (2/3) > >>

Change the editor metadata serialization to be Force Text type with visible metadata files, and you will be able to see what changes each time.

We've seen this, too.  Nothing actually changes in either the prefab or the meta file, they're just checked out of perforce.  (We've always had metadata serialization set to force text.)  For us, it usually happens after playing the game in the editor.  Just opening unity, saving, and quitting generally doesn't trigger it.  It's not strictly limited to NGUI prefabs, either, though they are the majority of affected files.  Occasionally something else like Physics2DSettings.asset will get checked out with no changes.

I personally usually check files in using P4V, even when they were checked out through Unity, so maybe Unity has some bad state cached and thinks those files are supposed to be checked out?  We've just been living with it here and reverting the checkouts when it happens.

I just did a couple of test that might help;

* Open project using NGUI 3, select "main" scene, run it and close project : 57 different prefab, meta and mat files checked out, 56 were unchanged but in one material file the texture guid had changed
* Open same project, select "main" scene and close it straight away without running : 8 files checked out, 4 had changes in width and/or height
* Opened a project which does not use NGUI at all; ran, selected different scenes etc. and then closed : no checkouts...

We're using SVN, not perforce, but we're experiencing a similar issue.

After recently (finally!) getting around to updating our project to use NGUI 3.0.x (and also switching over all our labels to using dynamic fonts, fwiw), our prefabs that we use for our game's UI are getting flagged as changed without any changes having been implemented. This is after the initial upgrade changes have been checked in, and we even checked them in additional times thinking that perhaps we (or NGUI) missed them during the upgrade somehow, but they continue to get flagged as changed.

Found this thread while checking to see if anyone else was having similar problems . . .

Thanks in advance, Michael, for any further wisdom you might lend as to how we can get this sorted!

We're currently using Unity 4.3.3 and NGUI 3.0.8f7.


So it turns out... Unity executes OnValidate function on scripts attached to prefabs that are not a part of the scene, and are not selected.

Yes, you read that right. Prefabs in the Project view cause their scripts to execute. So as it turns out, you may be doing your own thing, and you may be in a completely new scene with nothing in it, and your inspector may be showing nothing, but Unity will still take the liberty of running OnValidate functions on scripts of disabled objects that don't exist in your scene.

My guess is that this is what was causing those modifications.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version