-
Notifications
You must be signed in to change notification settings - Fork 140
Pre commit hook, which was checking unsaved scenes, is not checking also other GameObjects states, like ScriptableObjects #2338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2fa5b00
fix RIDER-63673 pre-commit hook for !IsPersistent gameObjects
van800 5ae8756
rename Scene -> State
van800 e8d43d0
use a bit of reflection to check IsDirty
van800 eb457cc
use a bit of reflection to check IsDirty 2
van800 f851401
fix for older Unity versions
van800 b040e70
++
van800 13683a6
rename
van800 7aa5e11
move to a better namespace
van800 50ec4c4
Merge remote-tracking branch 'origin/net223' into net223-RIDER-63673_…
van800 42df355
specify ScriptableObject instead of Object for perf reasons
van800 69d93fe
fix Documentation link for projects, where Unity version can not be d…
van800 bb48227
cache ourIsDirtyMethodInfo
van800 bac536d
comment
van800 9e05d3f
optimise perf
van800 5b4652b
fix HasFlag check
van800 2743b57
fix RIDER-80029 Make Unity Log tool window menu available even if Uni…
van800 d3ae17e
cleanup
van800 76ac5cd
handle dirty prefab
van800 a68762b
add testing instructions
van800 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
|
||
namespace JetBrains.Rider.Unity.Editor.AfterUnity56 | ||
{ | ||
public static class EnumExtensions | ||
{ | ||
/// <summary> | ||
/// HasFlag implementation for older dotnet framework | ||
/// </summary> | ||
/// <param name="flags"></param> | ||
/// <param name="flag"></param> | ||
/// <returns></returns> | ||
/// <exception cref="ArgumentException"></exception> | ||
public static bool HasFlag(this Enum flags, Enum flag) | ||
{ | ||
// check if from the same type. | ||
if (flags.GetType() != flag.GetType()) | ||
{ | ||
throw new ArgumentException("flags and flag should be of the same type."); | ||
} | ||
|
||
var intFlag = Convert.ToUInt64(flag); | ||
var intFlags = Convert.ToUInt64(flags); | ||
|
||
return (intFlags & intFlag) == intFlag; | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.