public override void CopyFrom <T>(T other) { SelectableTemplate otherTemplate = null; if (other.GetType() == typeof(SelectableTemplate)) { otherTemplate = other as SelectableTemplate; } Selectable otherSelectable = null; if (other.GetType() == typeof(Selectable)) { otherSelectable = other as Selectable; } if (otherSelectable == null && otherTemplate == null) { return; } if (otherSelectable != null) { CopyFrom(otherSelectable); } if (otherTemplate != null) { CopyFrom(otherTemplate); } }
public void CopyFrom(SelectableTemplate other) { transition.value = other.transition.value; colorBlock.value = other.colorBlock.value; spriteState.value = other.spriteState.value; transition.apply = other.transition.apply; colorBlock.apply = other.colorBlock.apply; spriteState.apply = other.spriteState.apply; }