Ejemplo n.º 1
0
        /// <summary>
        /// Persists the transform addition or re-parenting action<br/>
        /// - a new transform is being created each time the new component is added to stage
        /// - the transform could be reparented using drag & drop in the hierarchy view
        /// </summary>
        /// <param name="transform"></param>
        private void RecordAction(Transform transform)
        {
            //Debug.Log("RecordAction: " + transform);

            ComponentAdapter adapter = transform.GetComponent <ComponentAdapter>();
            PersistedAction  action  = new PersistedAction(adapter);

            _actions.Add(action);
#if DEBUG
            if (DebugMode)
            {
                Debug.Log("Action recorded: " + action);
            }
#endif
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Persists the transform addition or re-parenting action<br/>
		/// - a new transform is being created each time the new component is added to stage
		/// - the transform could be reparented using drag & drop in the hierarchy view
		/// </summary>
		/// <param name="transform"></param>
		private void RecordAction(Transform transform)
		{
			//Debug.Log("RecordAction: " + transform);

			ComponentAdapter adapter = transform.GetComponent<ComponentAdapter>();
			PersistedAction action = new PersistedAction(adapter);
            
			_actions.Add(action);
#if DEBUG
			if (DebugMode)
			{
				Debug.Log("Action recorded: " + action);
			}
#endif
		}