Compile errors (Create-an-Inventory-UI-with UI-Toolkit)

#17 · closed · 5 comments

View on GitHub ↗

tacman

Terrific Tutorial, thanks for putting it together! I get a variety of compile errors trying to open the finalProject in Create-an-Inventory-UI-with UI-Toolkit. I assume it's related to the library versions, I've tried all the normal things (updating Unity, updating to ui-toolkit-preview.13, etc.) but can't find away around this. Can you update the github project so that it works with 2020.3LTS or 2021.1. or 2021.2 (beta) please? I think it some other tutorials you're using the beta version, to skip the awkward part of enabling preview packages and installing com.unity.ui. FWIW, I'm on Linux, but I don't think that's the issue. Thanks.

Comments

tacman

One of the errors I'm getting following along with the tutorial is NullReferenceException: Object reference not set to an instance of an object InventoryUIController.Awake () (at Assets/WUG/Scripts/InventoryUIController.cs:16) But there are different errors depending the version of Unity and the Package Manager versions. If you'd like, I can create a fork and update it with the latest versions, and see if you get the same errors opening it. Thanks.

Yecats

I won't have time to convert this until probably the end of the weekend at the earliest. If you've got time, please do feel free to fork and give it a go. If you get it working in a different editor version, create a separate project folder in the final folder when you commit back so that folks have a reference to the multiple editor versions.

tacman

I can do that -- what version of the editor are you using? I'll create a fork for that.

Yecats

I had a bit of time this evening after all. I just upgraded the project to 2020.3.17f1. Everything looks to be working for me so you should be good to go. Let me know if you have any more issues.

tacman

Yep, works with 2021.1.17f1 too, though I get compile errors on loading, which go away after setting m_EnablePackageDependencies: 1 Though I'm not convinced setting it in the repo will fix that problem. Regardless, it works now, thanks!!