Skip to content

Conversation

eh-iart
Copy link
Contributor

@eh-iart eh-iart commented Oct 20, 2023

Proposed changes

Make the SerializableInterface work better as an Array or List. Added Extensions Methods to convert an Array/List of Interfaces to a Array/List of SerializableInterface.
Fixed and issue that prevented to set different Values to a Array/List in the Unity Inspector.

Types of changes

Put an x in the boxes that apply.

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes, no api changes)
  • Code style update (formatting, renaming)
  • Build related changes (workflow changes)
  • Documentation Update (readme, changelog)
  • Other, please describe:

Issue

None

What is the current behavior?

When having an Array/List of SerializableInterface in the Unity Editor and setting on Element with the Dropdown, all Elements were set to the Selection of the Dropdown.
There was no way to convert a Array/List of Interface to a Array/List of SerializableInterface which would be usefull when populating a SerializableInterface Array/List from an Editor Tool.

What is the new behavior?

When having an Array/List of SerializableInterface in the Unity Editor and setting on Element with the Dropdown, only the selected Element is set to the Selection of the Dropdown
There is a Constructor to create a SerializableInterface from an Interface and also extensions to create Array/Lists

Checklist

Put an x in the boxes that apply.

  • The code compiles
  • I have tested that this doesn't break existing code (unless it is an explicit breaking change)
  • I have tested that the (new) functionality/fix works as intended
  • I have added necessary documentation (if appropriate)

Further comments

I'm happy to discuss my changes

Only invoke Clicked for a Property if the Mouse is in the Property's Rect.
In case that the Property was part of an Array all Array Elements were being pinged.
This resulted in Unity ignoring all Pings except the last, so it was basically useless.
@Thundernerd
Copy link
Owner

Thanks for the PR! I’ll have a look at it soon :)

Copy link
Owner

@Thundernerd Thundernerd left a comment

Choose a reason for hiding this comment

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

Looks good, just some formatting requests :)

Co-authored-by: Christiaan Bloemendaal <[email protected]>
Copy link
Owner

@Thundernerd Thundernerd left a comment

Choose a reason for hiding this comment

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

Apologies, missed this one

Co-authored-by: Christiaan Bloemendaal <[email protected]>
@Thundernerd Thundernerd merged commit f3deca4 into Thundernerd:main Nov 7, 2023
@Thundernerd
Copy link
Owner

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants