Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mterlecki

Pages: [1]
1
I was able to use the GUID references in the sprite collection and compare them with the ones inside the sprite data ".meta" files and determine which sets of data were actually being used.
I deleted the others without issue. Everything seems to be working correctly now - thank you for you assistance.

2
Yes I have a prefab file as well.
So the "TitleBGSprites@1x 1 Data" file should not be there. What is the safest way to delete these extra files?

3
I have located the  problem and mostly fixed it. There were several files missing from Perforce - somehow they did not get added. However I still have a problem that after I do a build - some of my textures turn "Hot Pink" because they have lost the material reference. "Rebuild all sprites" fixes the issue.

But that does lead to another question. I have two platforms enabled (1x,2x), however when I look in sprite collection's data folder - there are 4 additional folders - I was expecting 2.

For example I have a sprite collection for my title screen name TitleBGSprites.

2DToolkit generated a folder by the name of "TitleBGSprites Data", inside this folder are 4 additional folders; "TitleBGSprites@1x 1 Data", "TitleBGSprites@1x Data", "TitleBGSprites@2x 1 Data" and "TitleBGSprites@2x Data"

Can you explain why there are 4 and what is in each one?

4
Do you have any other suggestions on how to correct this issue?

5
Copying the project directory over to a MAC works fine - checking it to Perforce and then Checking it out on the MAC breaks all of the Material references in all the sprites. It appears that Perforce is doing something to the files.

I have my Serialization Mode set to "Force Text" - this leads me to believe "Line Endings" in the text files may be the culprit.

Have you transitioned from MAC->PC using a version control system?

6
Yes - strangely it does. I copied it locally to a shared location on my pc and then from there to the MAC and it works.

7
So I copied my project to a separate directory and paired it down to a single scene and 2 sprite collections. Not surprisingly, after doing this the problem disappeared.

I don't know if this helps - but when I initially started the project, I had no platforms. It wasn't until later on that I started using multiple resolution textures. At that point I turned on platform support (1x,2x) for each of the sprite collections.

8
Yes - it happens both ways.
The first time it happened on the MAC - I saw that all my sprites were missing their Material references, so I opened each Sprite Collection and re-committed it. (Pressed the Commit button).
That fixed all of the problems on the MAC. Then I checked-in all those files and when I synced to the PC and opened the project I got the exact same errors. Opening each Sprite Collection and re-committing once again fixed the problem, but obviously this isn't a viable solution.

My project is set for 2 platforms (1x and 2x). I did notice that in the 2D ToolKit preferences dialog, under platform - nothing was selected, so I selected 1x.

Also as a rule of thumb, when I add a project to Perforce, I add the entire Assets directory. After reading a piece about using 2D Toolkit and version control - I saw that there were many files used by 2D Toolkit, that should NOT be added to version control (i.e. -tk2d.asset, -tk2d.asset.meta and all of the files in the Resources/tk2d directory).

I removed all of these files from version control, deleted the library directory, opened Unity and rebuilt the 2D Toolkit indexes. This was on the PC. Then I checked-in, checked-out on the MAC and did the same - no help. All sprites are missing their material references.

I'm at a loss for what to try next.

9
Yes - the meta files are checked-in.

10
Hi,
  I fixed all the errors on the MAC by opening each sprite collection and re-commiting them. However, when I went back to the PC - I got the same errors.

 The project is moved back and forth via version control - Perforce.

I have Hidden Mete Files selected as my version control mode in the editor settings.

No - the library folder is not copied.

-Mike

11
Hi,
 I have my project built and running fine on a PC. I copied the whole project over to a MAC and when I open it - I get hundreds of errors - one for each sprite:

NullReferenceException: Object reference not set to an instance of an object
tk2dSpriteCollectionData.get_inst () (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSpriteCollectionData.cs:555)
tk2dBaseSprite.Awake () (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dBaseSprite.cs:909)
tk2dSprite.Awake () (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSprite.cs:21)

I found that if I open the sprite collection and rebuild it - it works ok.

Do I have to rebuild all my spritecollections each time I move from the MAC to a PC?

Pages: [1]