public override void Awake(Scene scene) { base.Awake(scene); // store the values for these private variables. DynData <WaterFall> self = new DynData <WaterFall>(this); loopingSfx = self.Get <SoundSource>("loopingSfx"); enteringSfx = self.Get <SoundSource>("enteringSfx"); loopingSfxEvent = loopingSfx.EventName; enteringSfxEvent = enteringSfx.EventName; toggle.UpdateFlag(); if (toggle.Enabled) { alreadyTurnedOnOnce = true; } }
public override void Added(Scene scene) { base.Added(scene); toggle.UpdateFlag(); }