imagicbell / ublockly

reimplementation of google blockly for Unity
http://imagicbell.github.io/unity/2017/10/11/blockly-one.html
Apache License 2.0
138 stars 52 forks source link

Getting a error on trying to ignore some block categories #12

Closed toamig closed 3 years ago

toamig commented 3 years ago

Hello there. I'm trying to read only some block categories depending on the integrated sensors from our program. I'm trying to continue the loop if the sensor readed is not integrated. Although, it keeps giving me this ArgumentNullException: value cannot be null Parameter name: collection error. Could you give me some help trying to understand what can possibly be going on? Thanks in advance!

Trying to ignore some resParams from the m_BlockJsonFiles in BlockResMgr.cs

Imgur

toamig commented 3 years ago

I found out I could stop category initialization from the ToolBoxConfig.cs file

Imgur

Now my problem is that the category does not initialize, but category names are still displayable and clickabl on the UI

Imgur

imagicbell commented 3 years ago

image image

Did you remove the the category from the toolbox config file? Please see the Toolbox doc from here. If you change this config file, then you don't need to modify code, as this config file indicates what categories to show in side toolbox.

toamig commented 3 years ago

But am I supposed to change the jsonfile while the program is running? Beause I want the categories to be dynamic depending on the integration or not of some sensors

thanks for the response!

toamig commented 3 years ago

I was able to fix this, by deleting elements from the List of categories before initing them. Thanks for the help