This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Requireable constraint tweaks & bugfixing #1297
Merged
Merged
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
improbable-prow-robot
added
jira/no-ticket
Indicates a PR has no corresponding JIRA ticket
do-not-merge/work-in-progress
Indicates that a PR should not merge because it is a work in progress.
size/L
Denotes a PR that changes 150-299 lines, ignoring generated files.
A: core
Area: Core GDK
A: game-object-creation
Area: Gameobject creation feature module
labels
Feb 19, 2020
jamiebrynes7
force-pushed
the
tests/requireables-isvalid-tests
branch
from
February 19, 2020 11:28
28a8be3
to
719965b
Compare
improbable-prow-robot
added
size/XL
Denotes a PR that changes 300-599 lines, ignoring generated files.
and removed
size/L
Denotes a PR that changes 150-299 lines, ignoring generated files.
labels
Feb 19, 2020
zeroZshadow
approved these changes
Feb 19, 2020
workers/unity/Packages/io.improbable.gdk.core/Subscriptions/RequiredSubscriptionsInjector.cs
Outdated
Show resolved
Hide resolved
jamiebrynes7
force-pushed
the
tests/requireables-isvalid-tests
branch
from
February 20, 2020 12:27
719965b
to
2aec57c
Compare
Tested against FPS w/ multiple workers. Seemed to work as expected. Will write up a changelog entry. |
add multiple reader tests
…valid when unavailable
jamiebrynes7
force-pushed
the
tests/requireables-isvalid-tests
branch
from
February 20, 2020 15:47
2aec57c
to
fe98c31
Compare
jamiebrynes7
changed the title
(WIP) Requireable tweaks
Requireable constraint tweaks & bugfixing
Feb 20, 2020
…is no longer satisfied tweak requiredsubscriptionsinjector
jamiebrynes7
force-pushed
the
tests/requireables-isvalid-tests
branch
from
February 20, 2020 15:56
fe98c31
to
7acf43c
Compare
improbable-prow-robot
removed
the
do-not-merge/work-in-progress
Indicates that a PR should not merge because it is a work in progress.
label
Feb 20, 2020
jamiebrynes7
force-pushed
the
tests/requireables-isvalid-tests
branch
from
February 20, 2020 16:00
7acf43c
to
18f81d4
Compare
paulbalaji
approved these changes
Feb 20, 2020
zeroZshadow
approved these changes
Feb 20, 2020
1 task
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A: core
Area: Core GDK
A: game-object-creation
Area: Gameobject creation feature module
jira/no-ticket
Indicates a PR has no corresponding JIRA ticket
size/XL
Denotes a PR that changes 300-599 lines, ignoring generated files.
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.
Description
This PR makes some changes to when a field annotated with
[Require]
haveIsValid
set tofalse
and the value set tonull
.Previously this would only happen when a GameObject was unlinked from the underlying entity, typically when the entity had left the worker's view (unless a user had some custom logic). This means that if you had a MonoBehaviour like:
if the underlying Health component left your view, say through a QBI query the
HealthReader
field would be left injected andIsValid
would still be true. If you copied the reference or captured it in a closure, this could result in bad behaviour.Now, when the required field's constraints are no longer met,
HealthReader.IsValid
is set tofalse
and the MonoBehaviour's field is nulled out.A consequence of this change in behaviour is that now if you have multiple required fields on a single behaviour, if one of them no longer matches the constraints, every field will be
null
-ed out andIsValid
will be set to falseTests
Documentation