MergeActionExistence.cs 767 B

1234567891011121314151617181920212223
  1. 
  2. namespace GitMerge
  3. {
  4. using UnityEngine;
  5. /// <summary>
  6. /// The abstract base MergeAction for all MergeActions that manage whether or not an object exists
  7. /// </summary>
  8. public abstract class MergeActionExistence : MergeAction
  9. {
  10. public MergeActionExistence(GameObject ours, GameObject theirs)
  11. : base(ours, theirs)
  12. {
  13. ObjectDictionaries.AddToSchroedingersObjects(ours ?? theirs, this);
  14. }
  15. /// <summary>
  16. /// Apply whatever version that has the object existing, since it might be needed somewhere.
  17. /// When overriding, call either UseOurs or UseTheirs to make sure to trigger the side effects.
  18. /// </summary>
  19. public abstract void EnsureExistence();
  20. }
  21. }