protected void SetVector3Value(Vector3 val) { _ignoreChanges = true; if (_v3property != null) { _v3property.SetValue(val); } if (_v2property != null) { _v2property.SetValue(new Vector2(val.x, val.y)); } if (_transformProperty != null && _transformProperty.GetValue() != null) { _transformProperty.GetValue().position = val; } if (_componentProperty != null && _componentProperty.GetValue() != null) { _componentProperty.GetValue().transform.position = val; } if (_gameObjectProperty != null && _gameObjectProperty.GetValue() != null) { _gameObjectProperty.GetValue().transform.position = val; } _ignoreChanges = false; }
public void OnUIColorChange(Color color) { _ignoreChanges = true; if (_colorProperty != null) { _colorProperty.SetValue(color); } if (_hexProperty != null) { _hexProperty.SetValue(ColorToHex(color)); } _ignoreChanges = false; }
protected override void Bind() { base.Bind(); var context = GetContext(Path); if (context == null) { Debug.LogWarning("NguiAnimation.UpdateBinding - context is null"); return; } _animatorParameter = context.FindProperty <Animator>(Path, this); if (_animatorParameter != null) { _animatorParameter.OnChange += OnChange; if (_animator != null) { _animatorParameter.SetValue(_animator); } } }
protected override void Bind() { base.Bind(); var context = GetContext(Path); if (context == null) { Debug.LogWarning("NguiCamera.UpdateBinding - context is null"); return; } _cameraParameter = context.FindProperty <Camera>(Path, this); if (_cameraParameter != null) { _cameraParameter.OnChange += OnChange; if (_camera != null) { _cameraParameter.SetValue(_camera); } } }