-
Notifications
You must be signed in to change notification settings - Fork 388
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
CustomBehaviour Port drawers & Proxied Fields #204
Open
dannymate
wants to merge
28
commits into
alelievr:master
Choose a base branch
from
dannymate:CustomBehaviour_PortDrawers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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 reverts commit a511e4a.
Added proxiedFieldPath to input for CustomPortBeh ports Added ability to have property fields for dynamic ports.
Added GetNonRelayEdges List<SerializedEdge> extensions
Ngp changes
I've noticed a couple issues.
I've fixed these in my branch but I've messed this pull request up a bit so I'll create a new one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Solves issue: #202.
Added showAsDrawer to portdata, I initially created it as a replacement to ShowAsDrawer attribute but it turns out for what I was doing it wasn't required but I thought it may still be useful if creating a port without a backing field and you still want a property drawer.
Converted the single FieldInfo system in BaseNodeView to handle the new PortData field proxiedFieldPath. This is a path relative to the node the port is on. "fieldInNodeTarget.ChildFieldInThatField.etc.etc". I added a parser in BaseNodeView for this to create List. The methods in DrawDefaultInspector have been pertaining to AddControlField now use a List. In DrawDefaultInspector we check if it has any ports to its name and checks its portData to see if its being proxied and cycles through those. Other than some minor changes it piggybacks off of what already there this is largely due to FindSerializedProperty already uses the proxiedFieldPath format to get SeralizedProperty anyway.
I have added a few extension methods to make the code more readable.
I have provided an example of dynamic port generation with ProxiedFields.