Skip to content

InterfaceRef<T> improvements - #42

Open
BitterSmile wants to merge 2 commits into
KyleBanks:mainfrom
BitterSmile:main
Open

BitterSmile wants to merge 2 commits into
KyleBanks:mainfrom
BitterSmile:main

Conversation

@BitterSmile

Copy link
Copy Markdown

Hi!
Thank you for this package, I've been using it for a few years in every project!

I've made 2 changes to improve work with InterfaceRef
Firstly, there is new override for Equals. It is added to avoid marking scenes as dirty when it is not needed. Right now in SceneRefAttributeValidator there is

bool valueIsEqual = existingValue != null && 
                                    isCollection ? Enumerable.SequenceEqual((IEnumerable<object>)value, (IEnumerable<object>)existingValue) : value.Equals(existingValue);

so it will always set valueIsEqual to false for InterfaceRef as a new instance of it was created few lines before.

Another change is to handle drag and drop and get proper value. I encountered that problem few times personaly and I see that it was also reported here: #40
It is quite straight forward change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant