Fixing Invalid AABB error

(Leslie Young) #1

With the Sample UI you might get an Invalid AABB error message. It seems to stem from a scrollbar becoming invalid.

To fix this you need to pay attention to what it was that you opened when the error occurred. For example, if you were testing the game and opened the character sheet and noticed the error in the console then most likely cause is from the scrollbar in the character sheet.

  • Open the sample_ui scene: Assets/plyoung/plyRPG/GUI/Scenes/rpg_ui
  • Find the Character Sheet’s panel (GameObject) In the Hierarchy. This would be RPG_UI/CharaSheet.
  • Expand it down to where there is a scrollbar and replace the scrollbar.
    In this case there is a scrollbar at: RPG_UI/CharaSheet/Stats/Scrollbar.
  • Delete this scrollbar object.
  • Add a new one via menu: GameObject > UI > Scrollbar. It will probably be in wrong parent object so drag it into the one where the deleted scrollbar was. In this case RPG_UI/CharaSheet/Stats/
  • Now go to the Scrollbar inspector and set Direction = “Top to Bottom”.
  • The scrollbar flipped around and you can now scale it to fit nicely to the edge of the panel
  • Next the scrollbar needs to be attached to the scroll view it will interact with. This will be an object under the same parent as the scrollbar and most likely called “ScrollView”. In this case it is: RPG_UI/CharaSheet/Stats/ScrollView. - In the ScrollRect Inspector of the ScrolLView object drag-and-drop the Scrollbar into the Vertical Scrollbar field.

How to make a shield work?
Sample ui error message