Multiple compiler warnings when building UIExtensions

Issue #197 resolved
Isaac Norman created an issue

There are a lot of warnings output when compiling UIExtensions, in my opinion there should be none.

Comments (4)

  1. Simon Jackson

    I agree, there should be none. Can you detail under what conditions you are seeing warnings please

  2. Isaac Norman reporter

    I was making a change to fix/workaround issue 196 and doing a clean build in VS community 2017 I see:

    1>------ Rebuild All started: Project: UI Extensions Test, Configuration: Debug Any CPU ------ 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Utilities\ScrollRectLinker.cs(14,20,14,41): warning CS0649: Field 'ScrollRectLinker.controllingScrollRect' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\02_CellEventHandling\Example02ScrollViewCell.cs(9,14,9,21): warning CS0649: Field 'Example02ScrollViewCell.message' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\03_InfiniteScroll\Example03ScrollView.cs(8,34,8,58): warning CS0649: Field 'Example03ScrollView.scrollPositionController' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Utilities\UIScrollToSelection.cs(21,28,21,43): warning CS0649: Field 'UIScrollToSelection.scrollDirection' is never assigned to, and will always have its default value 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Utilities\UIScrollToSelectionXY.cs(25,31,25,46): warning CS0649: Field 'UIScrollToSelectionXY.layoutListGroup' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Controls\ComboBox\DropDownListItem.cs(81,25,81,33): warning CS0649: Field 'DropDownListItem.OnUpdate' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Layout\FancyScrollView.cs(11,15,11,27): warning CS0649: Field 'FancyScrollView<TData, TContext>.cellInterval' is never assigned to, and will always have its default value 0 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\01_Basic\Example01ScrollViewCell.cs(6,18,6,26): warning CS0649: Field 'Example01ScrollViewCell.animator' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\02_CellEventHandling\Example02ScrollViewCell.cs(11,15,11,20): warning CS0649: Field 'Example02ScrollViewCell.image' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\01_Basic\Example01Scene.cs(8,29,8,39): warning CS0649: Field 'Example01Scene.scrollView' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\VR Extensions\VRInputModule.cs(15,21,15,28): warning CS0169: The field 'VRInputModule.counter' is never used 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\03_InfiniteScroll\Example03ScrollViewCell.cs(7,18,7,26): warning CS0649: Field 'Example03ScrollViewCell.animator' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Utilities\PaginationManager.cs(15,32,15,42): warning CS0649: Field 'PaginationManager.scrollSnap' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\02_CellEventHandling\Example02Scene.cs(8,29,8,39): warning CS0649: Field 'Example02Scene.scrollView' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\03_InfiniteScroll\Example03ScrollViewCell.cs(13,16,13,22): warning CS0649: Field 'Example03ScrollViewCell.button' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\02_CellEventHandling\Example02ScrollView.cs(8,28,8,52): warning CS0649: Field 'Example02ScrollView.scrollPositionController' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\03_InfiniteScroll\Example03ScrollViewCell.cs(11,15,11,20): warning CS0649: Field 'Example03ScrollViewCell.image' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\02_CellEventHandling\Example02ScrollViewCell.cs(13,16,13,22): warning CS0649: Field 'Example02ScrollViewCell.button' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Layout\FancyScrollView.cs(15,14,15,18): warning CS0649: Field 'FancyScrollView<TData, TContext>.loop' is never assigned to, and will always have its default value false 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\02_CellEventHandling\Example02ScrollViewCell.cs(7,18,7,26): warning CS0649: Field 'Example02ScrollViewCell.animator' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\01_Basic\Example01ScrollViewCell.cs(8,14,8,21): warning CS0649: Field 'Example01ScrollViewCell.message' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Layout\ScrollPositionController.cs(43,17,43,25): warning CS0649: Field 'ScrollPositionController.viewport' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Layout\FancyScrollView.cs(17,20,17,28): warning CS0649: Field 'FancyScrollView<TData, TContext>.cellBase' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Utilities\UIScrollToSelectionXY.cs(33,31,33,44): warning CS0169: The field 'UIScrollToSelectionXY.currentCanvas' is never used 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\03_InfiniteScroll\Example03ScrollViewCell.cs(9,14,9,21): warning CS0649: Field 'Example03ScrollViewCell.message' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Scripts\Layout\FancyScrollView.cs(13,15,13,25): warning CS0649: Field 'FancyScrollView<TData, TContext>.cellOffset' is never assigned to, and will always have its default value 0 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\03_InfiniteScroll\Example03Scene.cs(8,29,8,39): warning CS0649: Field 'Example03Scene.scrollView' is never assigned to, and will always have its default value null 1>C:\UI Extensions Test\Assets\unity-ui-extensions\Examples\FancyScrollView\01_Basic\Example01ScrollView.cs(8,34,8,58): warning CS0649: Field 'Example01ScrollView.scrollPositionController' is never assigned to, and will always have its default value null

  3. Simon Jackson

    I will certainly fix those. I am of the opinion, there shouldn't be any warnings or errors in an asset.

  4. Log in to comment