public override void ApplyWrapper(IExposedWrapper wrapper, bool ignoreDirtyMask = false) { if (wrapper is Wrapper w) { if (ignoreDirtyMask || wrapper.IsDirty(POSITION_ID)) { Target.position = w.GetValue <Vector3>(POSITION_ID); } if (ignoreDirtyMask || wrapper.IsDirty(ROTATION_ID)) { Target.eulerAngles = w.GetValue <Vector3>(ROTATION_ID); } if (ignoreDirtyMask || wrapper.IsDirty(SCALE_ID)) { Target.localScale = w.GetValue <Vector3>(SCALE_ID); } if (ignoreDirtyMask || wrapper.IsDirty(PARENT_ID)) { SetParent(w.GetValue <ComponentDataWrapper>(PARENT_ID)); } } }
protected override void INTERNAL__ApplyWrapper(IExposedWrapper wrapper, bool ignoreDirtyCheck) { base.INTERNAL__ApplyWrapper(wrapper, ignoreDirtyCheck); if (wrapper.IsDirty(4)) { value4 = wrapper.GetValue <Vector3>(4); } if (wrapper.IsDirty(5)) { value5 = wrapper.GetValue <float>(5); } if (ignoreDirtyCheck || wrapper.IsDirty(10)) { if (vectorList == null) { vectorList = new List <Vector3>(); } else { vectorList.Clear(); } vectorList.AddRange(wrapper.GetValue <List <Vector3> >(10)); } }