ssannandeji / Zenject-2019

Dependency Injection Framework for Unity3D
MIT License
2.53k stars 363 forks source link

(Solved: Nope it's my own code) Zenject crashing Unity Editor, maybe it's related with injecting values to class #620

Closed tkaczz closed 5 years ago

tkaczz commented 5 years ago

Hello everyone, I have weird problem with Zenject because it's crashing Unity Editor every time when I hit play.

Expected behavior: Unity editor is working and Zenject bind's all it's things.

How to reproduce: Well it's complicated, I'll post sample project instead https://my.pcloud.com/publink/show?code=XZOrxt7ZrIjlfQQN8cbyOCFHTO3sFJUlAXUX

Later I'll try to post reproduce steps. Edit: See my next comment

tkaczz commented 5 years ago

Now it's getting really weird because if I change

public Languages CurrentValue {
            get {
                return CurrentValue;
            }

            set {
                CurrentValue = value;
                OnSettingChanged?.Invoke(CurrentValue);
            }
        }

To simple

public Languages CurrentValue { get; set; }

Then it's not crashing...

If I place backing field then it's ok, maybe it's my next junior mistake.
https://stackoverflow.com/questions/38858316/custom-setter-but-auto-getter/38858356
Look's like it's not possible

This issue can be closed.