I have made a prefab that also had a canvas. Unity added a Canvas Environment as the parent. Never had an issue until today. For some unknown reason, when I try to edit the prefab, the Canvas Environment is greyed out and not ticked in the inspector, and I am therefore unable to see any of the prefab in edit mode. I am unable to tick it in inspector to activate it.
Any ideas? It has happened to all prefabs that have a Canvas Environment. What have I accidentally done :(
Version 2019.3.7f1 Picture of inspector: https://ibb.co/FJSz79q Picture of Prefab hierarchy: https://ibb.co/bm6NbhL
CodePudding user response:
You have disabled the canvas by accident, in the inspector for the canvas click the little box on the left of the name to enable it again.
CodePudding user response:
You can set UI environment through Edit > Project Settings > Editor > UI Environment
. A scene asset can be set there. If the set scene contains a Canvas component, it will be used as an Environment for UI prefab edit mode. Go to that scene and make sure Canvas is not disabled there.