Skip to content
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

Add a null-check of TeleportMarker before instantiating the object. #1122

Merged

Conversation

timGerken
Copy link
Contributor

@timGerken timGerken commented Oct 11, 2017

Fixes #1112 Added a null-check of TeleportMarker before instantitiating the object.
Fixes #1113 Add an option to use sharedMaterial when fading.

}
else
{
fadeMaterial = GetComponentInChildren<MeshRenderer>().material;
Copy link
Contributor

Choose a reason for hiding this comment

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

.material is bad unless we're destroying the fade material later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR will then address both #1112 and #1113.
Not my original intent.

@@ -90,7 +99,7 @@ void CalculateFade()

protected override void OnDestroy()
{
if (fadeMaterial != null)
if (fadeMaterial != null && !FadeSharedMaterial)
{
Destroy(fadeMaterial);
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh good. we are.

@StephenHodgson
Copy link
Contributor

We could put this on the master branch, if we get the back port in soon.

@StephenHodgson StephenHodgson merged commit ed0201a into microsoft:Dev_Unity_2017.2.0 Oct 11, 2017
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.

None yet

3 participants