/// <summary> /// Attempt to grab our property from the service so that we can bind it. /// </summary> private IEnumerator CheckForProperty() { mSearching = true; yield return(new WaitForEndOfFrame()); yield return(new WaitForEndOfFrame()); while (mProperty == null) { mProperty = mUIManagerRef.GetProperty <T>(mPropertyHash); yield return(null); } AttachProperty(); }
/// <summary> /// Attempt to grab our properties from the service so that we can bind them. /// </summary> private IEnumerator CheckForProperties() { mSearching = true; yield return(null); yield return(null); while (mCurrentValue == null || mFullValueProperty == null && !string.IsNullOrEmpty(mFullProperty)) { mCurrentValue = mUIManagerRef.GetProperty <T>(mCurrentHash); if (!string.IsNullOrEmpty(mFullProperty)) { mFullValueProperty = mUIManagerRef.GetProperty <T>(mFullHash); } yield return(null); } AttachProperties(); }
/// <summary> /// Unity's Awake function. /// Sets things up to bind our property assigned in-editor. /// </summary> protected virtual void Awake() { mPropertyHash = mBoundProperty.GetHashCode(); mProperty = null; }
/// <summary> /// Handle a property being destroyed and start to look for a new one. /// </summary> private void CleanupProperty() { mProperty.ValueChanged -= HandlePropertyChanged; mProperty.BeingDestroyed -= CleanupProperty; mProperty = null; }
/// <summary> /// Cleanup references to the full value property. /// </summary> private void CleanupFullProperty() { mFullValueProperty.ValueChanged -= FullValueChanged; mFullValueProperty.BeingDestroyed -= CleanupFullProperty; mFullValueProperty = null; }
/// <summary> /// Cleanup references to the current value property. /// </summary> private void CleanupCurrentProperty() { mCurrentValue.ValueChanged -= CurrentValueChanged; mCurrentValue.BeingDestroyed -= CleanupCurrentProperty; mCurrentValue = null; }