Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Palette Bug Fixes #165

Merged
merged 3 commits into from
Aug 26, 2018
Merged

Palette Bug Fixes #165

merged 3 commits into from
Aug 26, 2018

Conversation

sabresaurus
Copy link
Owner

  • Palette (and Material Palette) now tracks asset path as a fallback in case the GUID changes (observed a lot with scriptable objects)
  • Palette also saves more aggressively since Unity doesn't seem to save player prefs unless you run the game

Barnaby MacBook added 2 commits August 26, 2018 13:29
…in case the GUID changes (observed a lot with scriptable objects)

* Palette also saves more aggressively since Unity doesn't seem to save player prefs unless you run the game
@sabresaurus sabresaurus requested a review from Henry00IS August 26, 2018 12:38
Copy link
Collaborator

@Henry00IS Henry00IS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works perfectly, after changing the GUID on one of my assets it was able to track it again (I had Unity closed during the change).

Just one minor C# warning that should be removed before we merge it.

{
// Get the guid, for older versions this is the only thing in the string, for newer versions it's the
// left side of a colon. Either way Split()[0] works
string guid = trackedObjectString.Split(':')[0];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning CS0219: The variable `guid' is assigned but its value is never used

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@Henry00IS
Copy link
Collaborator

After you fixed that warning it also tracks items with GUID changes while Unity is running. The saving works perfectly (without running the game) and I tested it down to Unity 5.3, very nice work @sabresaurus, thank you! 😁

@Henry00IS Henry00IS merged commit efebe35 into master Aug 26, 2018
@Henry00IS Henry00IS deleted the bugs/more_resilient_palette_tracking branch October 31, 2018 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants