Exemplo n.º 1
0
        private void restoreBehavior(Nodes.BehaviorNode source, bool dirty)
        {
            Debug.Check(source != null && _behavior != null);
            if (source != null && _behavior != null)
            {
                try
                {
                    _behavior.Restore((Nodes.BehaviorNode)source.Clone());

                    if (dirty)
                    {
                        // dirty this behavior to save it
                        ((Nodes.Node)_behavior).OnPropertyValueChanged(true);
                    }

                    if (_behavior.IsPrefab)
                    {
                        resetAllPrefabInstances(_behavior);
                    }
                }
                catch (Exception)
                {
                }
            }
        }
Exemplo n.º 2
0
        private void restoreBehavior(Nodes.BehaviorNode source, bool dirty)
        {
            Debug.Check(source != null && _behavior != null);

            try
            {
                _behavior.Restore((Nodes.BehaviorNode)source.Clone());

                if (dirty)
                {
                    // dirty this behavior to save it
                    ((Nodes.Node)_behavior).OnPropertyValueChanged(true);
                }

                restoreReferenceBehaviors(_behavior);
            }
            catch (Exception)
            {
            }
        }