Easy Legacy uGUI Canvas Raycast Camera updater
See original GitHub issueOverview
Provide an easy way to update the default canvas raycasting camera for projects using uGUI. New users are not affected, because we’re already prompting them when they create new canvases.
Currently the only easy way to do this is by using the scene configuration menu and re-adding the InputManager.
More advanced users can also manually call the update using FocusManager.Instance.UpdateCanvasEventSystems();
Expected Behavior
When devs open legacy projects, we should prompt them once if they wish to update their canvases default raycasting camera if the canvas’ render mode is set to world space.
Actual Behavior
Currently older projects are automatically opted out to using the new UIRaycastCamera as the default raycaster, and devs need to manually assign the camera to each canvas who’s render mode is set to world space.
Unity Editor Version
Any/All
Mixed Reality Toolkit Release Version
405bb16be62b5d1eb18f8e5f39d9d1fe9a962013
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (7 by maintainers)
Top GitHub Comments
But I cannot add the UI Raycast Camera to the Unity Canvas, because I do not have a Input Manager (Which contains the Raycast Camera) in my “work-scene”. The Input Manager Prefab is marked as DontDestroyOnLoad in my “Startup scene”, and is thus removed from my Work-Scene for serialization. I still believe this is relevant to this discussion.
I like the solution you made for Raycasting Unity UI from multiple locations. But it has (in combination with the Singleton change) created issues when trying to update our (multi-scene) projects to the latest version of the MR-Toolkit. And i’m trying to to figure out how we should proceed.
Sorry if i’m still wrong here, but I still can’t see how I should do this correctly.
Edit: Tried to make myself a bit more understandable.
I think the issue is in remembering to add a new script in each new scene to call
Ideally this script would live on the Camera object. It could have a delegate to
And thus would be responsible for rewiring the connection itself. At a minimum, the documentation could use a section calling out changes required for multi-scene projects.