Author Topic: Problem with dynamic fonts and source control  (Read 43783 times)

kruncher

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Problem with dynamic fonts and source control
« on: January 15, 2014, 12:03:54 AM »
Hey guys

I am using GIT for my project and have configured it as follows:

- Using "Visible Meta Files"
- "Force Text"
- .gitignore excludes the "Library" folder.

The Problem:

When pulling repo from remote onto another computer, any references to dynamic fonts in prefabs are lost.

Workaround:

1. Pull from remote (into fresh folder).
2. Verify GIT shows no working changes.
3. Open Unity.
4. Wait for assets to import.
5. Notice that some of the affected prefabs show up in GIT as modified where font guid references have been erased. Not all affected prefabs are listed.
6. Reset these changes.
7. Those which were listed are now temporarily fixed.
8. For other affected prefabs:
... a) Select prefab.
... b) Temporarily change value of a field.
... c) Select "File | Save Project".
... d) Restore value of field.
... e) Select "File | Save Project".
9. Reset any working changes in GIT.
10. Fixed... until next time

This feels like a bug in Unity... but is there anything I am doing wrong?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #1 on: January 15, 2014, 10:08:19 PM »
Are you sure you checked in all the "meta" files? Simply showing meta files is not enough. You need to commit them and push them alongside the actual files.

kruncher

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #2 on: January 16, 2014, 11:58:52 AM »
Meta files are committed to the git repository so that the 'Library' folder can be rebuilt. I have narrowed this down to a bug with either Unity or the scroll bar class and have submitted a bug report to Unity (Case 585890).

http://www.youtube.com/watch?v=J2GBJ4IV7bs

Please let me know if you would like me to send you the repro project directly. Though I guess that you should be able to access the case details directly.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #3 on: January 16, 2014, 10:36:18 PM »
I don't work at Unity anymore, I left at the end of November to pursue my own interests. But it does sound like some bug in Unity, so it's a good thing you submitted a bug report. I'd recommend doing a repro case without NGUI in it though. When Unity guys see "NGUI", or some other plugin, they just usually blame the plugin.

kruncher

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #4 on: January 16, 2014, 11:10:16 PM »
Quote
I don't work at Unity anymore, I left at the end of November to pursue my own interests.
I really wish you all the best with this!
Quote
I'd recommend doing a repro case without NGUI in it though. When Unity guys see "NGUI", or some other plugin, they just usually blame the plugin.
I can't reproduce this without NGUI present... I have spent a considerable amount of time trying. When the scroll bar is present it breaks, when its not, it works fine...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #5 on: January 16, 2014, 11:21:46 PM »
What does having or not having a scroll bar have to do with dynamic fonts? o_O

kruncher

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #6 on: January 16, 2014, 11:23:15 PM »
On the repro project, delete the scroll bar and it magically just works...

kruncher

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #7 on: January 16, 2014, 11:23:56 PM »
If you PM me your email, I will send it to you directly if you want. I feel that this is a Unity bug somehow triggered by the state of the scroll bar...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #8 on: January 16, 2014, 11:31:30 PM »
It's support at tasharen.com, but I doubt I can do much here. Sounds strange to say the least.

I'd prefer a dropbox link btw (but also sent via private email).

kruncher

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #9 on: January 17, 2014, 12:12:26 AM »
I don't have a DropBox account at the moment, so I have sent the file to you using WeTransfer which avoids cluttering your inbox with attachments. I hope that this is okay for you...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #10 on: January 17, 2014, 12:24:27 AM »
Yup, thanks.

BurningToad

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #11 on: January 17, 2014, 10:26:31 AM »
Just thought that I would chime in and say that we have seen a similar issue pop up.  We use perforce for source control, and check in all the meta files.  On a new machine (getting all the code from depot and importing and such for the first time) we have seen the dynamic font references disappear from prefabs as well.

gekido

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 18
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #12 on: January 18, 2014, 03:57:31 PM »
are the fonts installed on all machines?  that's one of the biggest issues with the dynamic fonts, the exact version of the font must be installed on all machines - so if you have pc / mac dev's (for example), I could see font references being lost for example...

kruncher

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #13 on: January 19, 2014, 03:43:57 PM »
Quote
are the fonts installed on all machines?
In my case the fonts do happen to be installed.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with dynamic fonts and source control
« Reply #14 on: January 20, 2014, 12:27:17 AM »
"Installed"? The TrueType font should be a part of your project.