Menu Item for Directional Scroll Snap Throws Error When Creating Canvas

Issue #6 resolved
Beka Westberg repo owner created an issue

Problem Statement

If there is no canvas in the scene already, the menu item will attempt to create a canvas, but when it does this it adds components to the gameobject out of order causing a null reference error.

Steps to Reproduce

  1. Create an empty scene.
  2. In the Hierarchy window go to create > UI > Scroll Snaps > Directional Scroll Snap.
  3. Observe how the Directional Scroll Snap is not created & a Null Reference error is thrown.

Additional Information

The canvas component should be added to the canvas object before adding any other components.

A fix for this should include a test for this circumstance.

Comments (1)

  1. Log in to comment