Sunday, 19 July 2015

Unity 3D - Red Lines in Scene View when importing UI Prefab

I had an issue importing a UI prefab using Unity 5. When I imported it, there were a lot a red lines over the scene. The prefab was not showing up in the scene view or game view. It appears as if the UI prefab is corrupted or is invalid.


The problem here is that the UI prefab was not imported into the UI canvas. 
This is fixed by:
  1. Removing the prefab from the scene
  2. Add a UI Canvas to the scene
  3. Add the prefab to the Canvas