public override void UpdateBinding() { if (_hexProperty != null) { _hexProperty.OnChange -= OnChange; _hexProperty = null; } if (_colorProperty != null) { _colorProperty.OnChange -= OnChange; _colorProperty = null; } var context = GetContext(); if (context == null) { Debug.LogWarning("iGuiColorBinding.UpdateBinding - context is null"); return; } _colorProperty = context.FindProperty<Color>(Path, this); if (_colorProperty == null) _hexProperty = context.FindProperty<string>(Path, this); if (_colorProperty != null) _colorProperty.OnChange += OnChange; if (_hexProperty != null) _hexProperty.OnChange += OnChange; OnChange(); }
protected override void Unbind() { base.Unbind(); if (_masterVolumeProperty != null) _masterVolumeProperty.OnChange -= ApplyVolume; _masterVolumeProperty = null; }
protected override void Unbind() { base.Unbind(); if (_shader != null) { _shader.OnChange -= OnChange; _shader = null; } }
protected override void Unbind() { base.Unbind(); if (_clip != null) { _clip.OnChange -= OnChange; _clip = null; } }
protected override void Unbind() { base.Unbind(); if (_texture != null) { _texture.OnChange -= OnChange; _texture = null; } }
protected override void Bind() { var context = GetContext(MasterVolume); if (context != null) _masterVolumeProperty = context.FindProperty<float>(MasterVolume, this); if (_masterVolumeProperty != null) _masterVolumeProperty.OnChange += ApplyVolume; base.Bind(); }
protected override void Unbind() { if (_hexProperty != null) { _hexProperty.OnChange -= OnChange; _hexProperty = null; } if (_colorProperty != null) { _colorProperty.OnChange -= OnChange; _colorProperty = null; } }
protected override void Bind() { base.Bind(); var context = GetContext(Path); if (context == null) { Debug.LogWarning("NguiTexture.UpdateBinding - context is null"); return; } _shader = context.FindProperty<Shader>(Path, this); if (_shader != null) { _shader.OnChange += OnChange; } }
protected override void Bind() { base.Bind(); var context = GetContext(Path); if (context == null) { Debug.LogWarning("NguiAnimation.UpdateBinding - context is null"); return; } _clip = context.FindProperty<string>(Path, this); if (_clip != null) { _clip.OnChange += OnChange; } }
private void Bind(NguiDataContext context) { _v3property = context.FindProperty<Vector3>(Path, this); if (_v3property != null) { _v3property.OnChange += OnChange; return; } _v2property = context.FindProperty<Vector2>(Path, this); if (_v2property != null) { _v2property.OnChange += OnChange; return; } _t2property = context.FindProperty<Texture2D>(Path, this); if (_t2property != null) { _t2property.OnChange += OnChange; return; } _transformProperty = context.FindProperty<Transform>(Path, this); if (_transformProperty != null) { _transformProperty.OnChange += OnChange; return; } _componentProperty = context.FindProperty<Component>(Path, this); if (_componentProperty != null) { _componentProperty.OnChange += OnChange; return; } _gameObjectProperty = context.FindProperty<GameObject>(Path, this); if (_gameObjectProperty != null) { _gameObjectProperty.OnChange += OnChange; return; } }
public override void UpdateBinding() { if (_property != null) _property.OnChange -= OnChange; var context = GetContext(); if (context == null) { Debug.LogWarning("iGuiClockTimeBinding.UpdateBinding - context is null"); return; } _property = context.FindProperty<DateTime>(Path, this); if (_property != null) { _property.OnChange += OnChange; } OnChange(); }
protected override void Bind() { var context = GetContext(Path); if (context == null) { Debug.LogWarning("NguiColorBinding.UpdateBinding - context is null"); return; } _colorProperty = context.FindProperty<Color>(Path, this); if (_colorProperty == null) _hexProperty = context.FindProperty<string>(Path, this); if (_colorProperty != null) _colorProperty.OnChange += OnChange; if (_hexProperty != null) _hexProperty.OnChange += OnChange; OnChange(); }
public override void UpdateBinding() { if (_texture != null) { _texture.OnChange -= OnChange; _texture = null; } var context = GetContext(); if (context == null) { Debug.LogWarning("iGuiTexture.UpdateBinding - context is null"); return; } _texture = context.FindProperty<Texture2D>(Path, this); if (_texture != null) { _texture.OnChange += OnChange; } OnChange(); }
protected override void Unbind() { base.Unbind(); if (_gameObjectProperty != null) _gameObjectProperty.OnChange -= OnChange; if (_componentProperty != null) _componentProperty.OnChange -= OnChange; if (_transformProperty != null) _transformProperty.OnChange -= OnChange; if (_v3property != null) _v3property.OnChange -= OnChange; if (_v2property != null) _v2property.OnChange -= OnChange; if (_t2property != null) _t2property.OnChange -= OnChange; _gameObjectProperty = null; _componentProperty = null; _transformProperty = null; _v3property = null; _v2property = null; _t2property = null; }