/// <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 }
/// <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 }