guycalledfrank / bakery-issues

Bug tracker for Bakery
4 stars 0 forks source link

OnEnable instead of Awake for global volumes #68

Closed laurentopia closed 3 years ago

laurentopia commented 3 years ago

this way we can use global volumes in timeline without having to increase setup complexity

public void OnEnable()
{
    if (isGlobal)
    {
        globalVolume = this;
        SetGlobalParams();
    }
}
guycalledfrank commented 3 years ago

I think there was some reason why I decided to go with Awake, but I forgot it. Probably.

Anyway, I can't see it breaking anything, and it actually makes sense, so changed it: https://github.com/guycalledfrank/bakery-csharp/commit/071cc0aaa4ca7fd3def91813301896622b0a3030