public void AssignFrom(Pattern3D pattern, bool fromShape2Pattern = false) { constraintSize = pattern.constraintSize; geo = pattern.geo; sizeZ = pattern.sizeZ; layer = pattern.layer; offset.content = pattern.offset; scale.content = pattern.scale; rot.content = pattern.rot; pivot.content = pattern.pivot; deltaAmp.content = pattern.deltaAmp; deltaOffset.target = pattern.deltaOffset; deltaSpeed.target = pattern.deltaSpeed; deltaPivot.content = pattern.deltaPivot; tex = pattern.tex; alpha = pattern.alpha; fn = pattern.fn; enable = pattern.enable; antiShadow = pattern.antiShadow; flip = pattern.flip; solid = pattern.solid; fullWarp = pattern.fullWarp; CastShadow = pattern.CastShadow; ReceiveShadow = pattern.ReceiveShadow; if (fromShape2Pattern) { TagStr = pattern.TagStr; sizeZ = Mathf.Min(pattern.sizeZ, MAX_ZSIZE); Build(); } else { refPattern3D = pattern; tagStr = pattern.tagStr; tags = pattern.tags; linkedScript = pattern.linkedScript; } }
public void Reset() { refPattern3D = this; geo = Geo3DType.CUBE; layer = ZLayer.UNIDENTIFIED; scale.content = Vector3.one; offset.content = Vector3.zero; rot.content = Vector3.zero; pivot.content = Vector3.one / 2; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { deltaSpeed[i, j] = DefaultSpeed; deltaOffset[i, j] = DefaultOffset; } } deltaAmp.content = Vector3.zero; deltaPivot.content = Vector3.one / 2f; alpha = 1; tex = null; fn = false; enable = true; antiShadow = false; flip = false; solid = false; fullWarp = false; CastShadow = true; ReceiveShadow = true; tagStr = string.Empty; linkedScript = null; tags = null; }