Unity Throws assertions for main camera
See original GitHub issueOverview
In 2017.2.0f3 and 2017.2.0p1 unity throws assertions for the main camera when checking is the display is opaque.
Assertion failed: Main camera does not exist!
UnityEngine.XR.WSA.HolographicSettings:get_IsDisplayOpaque
Steps for work around
Use the MRTP editor builds
Unity Editor Version
2017.2.0f3 and 2017.2.0p1
Mixed Reality Toolkit Release Version
db59a1c7fa0c0c463466028c5f3e70088bbfda52
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Assert - Scripting API
The Assert class contains assertion methods for setting invariants in the code. ... Assert throws exceptions whenever an assertion fails.
Read more >How to write unit tests that can be visually inspected?
I'm just using what Unity provides for unit testing, and the screenshot shows the default test hierarchy view from the editor, so I...
Read more >Why does checking if Camera.Main is non-null generate an ...
I'm trying to add a line in my character controller that checks if the main camera exists, and turns the character relative to...
Read more >OnBecameInvisible() Throwing error when game stops
It says “Assertion failed on expression: 'go.IsActive() && go.GetTag() != 0'”. This happens only when I exit play mode. And there is another ......
Read more >Unity 5.1 Assertion Library
If you want asserts to be included in your build (asserts are not exceptions by default) then all you need to do is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone else hitting this… wrapping a Application.isEditor check around each call to prevent the code from getting hit in the editor is a messy but working solution.
@StarWardo Unfortunately, this is a Unity bug with seemingly many versions of 2017.2. The Toolkit and Microsoft now recommend Unity’s LTS branch, 2017.4, for WMR development.