stillwwater / command_terminal

Unity Command Terminal: In-Game Console
MIT License
446 stars 60 forks source link

BUG Background isn't rendered. (workaround) #22

Open Tymski opened 4 years ago

Tymski commented 4 years ago

The background isn't rendered at all and I found why. In Terminal.cs you use SetupWindow in Start, where window sizes are not always calculated and return 0. It may still work in some cases, depending on the order your scripts compile.

The dirty trick I used to "fix" this issue IEnumerator LateStart() { yield return null; SetupWindow(); }

And start the coroutine at the end of Start() StartCoroutine(LateStart());

klaszlo8207 commented 3 years ago

The background isn't rendered at all and I found why. In Terminal.cs you use SetupWindow in Start, where window sizes are not always calculated and return 0. It may still work in some cases, depending on the order your scripts compile.

The dirty trick I used to "fix" this issue IEnumerator LateStart() { yield return null; SetupWindow(); }

And start the coroutine at the end of Start() StartCoroutine(LateStart());

It is not working, when you change the scene and the Terminal remain the same. The background just become transparent.

Can you help me?

Tymski commented 3 years ago

Yea, this "workaround" doesn't really work in all cases. I decided to abandon this asset since it has other bugs and issues.