hecomi / uREPL

In-game powerful REPL environment for Unity3D.
http://tips.hecomi.com/entry/2015/12/05/003000
MIT License
552 stars 54 forks source link

ReadonlyFieldItem null checks #10

Closed zhdiv closed 5 years ago

zhdiv commented 7 years ago

Hi, ReadonlyFieldItem class require additional null check. Something like: protected set { valueText.text = value==null ? "Null" : value.ToString(); } Got error with null reference exception if field is unassigned.

And if it possible do not display null message in console at Window.OnSubmit() if result.type == CompileResult.Type.Success

And of course big thanks for asset.

hecomi commented 6 years ago

Sorry for my late reply... I've fixed the null check, thank you for the suggestion. This fix will be included in the next release.

Regarding the null output, I want to think more about it because uREPL cannot distinguish below scenarios:

$ var obj = GameObject.Find("Cube");
> null
$ object obj;
> null
$ obj; // user wants to check obj is null or not.
> null
hecomi commented 6 years ago

Released: https://github.com/hecomi/uREPL/releases/tag/v0.5.1