// Deep copy constructor public Uni2DEditorSpriteSettings(Uni2DEditorSpriteSettings a_rSpriteSettings) { this.textureContainer = new Texture2DContainer(a_rSpriteSettings.textureContainer); // Deep copy this.atlas = a_rSpriteSettings.atlas; this.sharedMaterial = a_rSpriteSettings.sharedMaterial; this.renderMesh = a_rSpriteSettings.renderMesh; this.usePhysicBuildSettings = a_rSpriteSettings.usePhysicBuildSettings; this.spriteScaleMode = a_rSpriteSettings.spriteScaleMode; this.spriteScale = a_rSpriteSettings.spriteScale; this.spriteScaleNotUniform = a_rSpriteSettings.spriteScaleNotUniform; this.pivotType = a_rSpriteSettings.pivotType; this.pivotCustomCoords = a_rSpriteSettings.pivotCustomCoords; this.vertexColor = a_rSpriteSettings.vertexColor; this.dimensionMode = a_rSpriteSettings.dimensionMode; this.physicsMode = a_rSpriteSettings.physicsMode; this.collisionType = a_rSpriteSettings.collisionType; this.isKinematic = a_rSpriteSettings.isKinematic; this.isTrigger = a_rSpriteSettings.isTrigger; this.renderMeshAlphaCutOff = a_rSpriteSettings.renderMeshAlphaCutOff; this.renderMeshPolygonizationAccuracy = a_rSpriteSettings.renderMeshPolygonizationAccuracy; this.renderMeshPolygonizeHoles = a_rSpriteSettings.renderMeshPolygonizeHoles; this.alphaCutOff = a_rSpriteSettings.alphaCutOff; this.extrusionDepth = a_rSpriteSettings.extrusionDepth; this.polygonizationAccuracy = a_rSpriteSettings.polygonizationAccuracy; this.polygonizeHoles = a_rSpriteSettings.polygonizeHoles; this.onlyBorder = a_rSpriteSettings.onlyBorder; this.subdivide = a_rSpriteSettings.subdivide; this.subdivisionCount = a_rSpriteSettings.subdivisionCount; this.renderMeshGridHorizontalSubDivs = a_rSpriteSettings.renderMeshGridHorizontalSubDivs; this.renderMeshGridVerticalSubDivs = a_rSpriteSettings.renderMeshGridVerticalSubDivs; this.skinQuality = a_rSpriteSettings.skinQuality; this.boneInfluenceFalloff = a_rSpriteSettings.boneInfluenceFalloff; }
// Shallow copy constructor public Uni2DEditorSpriteData(Uni2DEditorSpriteData a_rSpriteData) { this.spriteWidth = a_rSpriteData.spriteWidth; this.spriteHeight = a_rSpriteData.spriteHeight; this.renderMesh = a_rSpriteData.renderMesh; this.renderMeshMaterial = a_rSpriteData.renderMeshMaterial; this.generatedMaterial = a_rSpriteData.generatedMaterial; this.renderMeshVertices = a_rSpriteData.renderMeshVertices; this.renderMeshUVs = a_rSpriteData.renderMeshUVs; this.pivotCoords = a_rSpriteData.pivotCoords; this.scaleMode = a_rSpriteData.scaleMode; this.scale = a_rSpriteData.scale; this.scaleNotUniform = a_rSpriteData.scaleNotUniform; this.colliderTriangleCount = a_rSpriteData.colliderTriangleCount; this.meshCollidersRootGameObject = a_rSpriteData.meshCollidersRootGameObject; this.meshCollidersList = new List <Mesh>(a_rSpriteData.meshCollidersList); this.meshColliderComponentsList = new List <MeshCollider>(a_rSpriteData.meshColliderComponentsList); #if AFTER_UNITY_4_3 this.polygonCollider2D = a_rSpriteData.polygonCollider2D; this.mesh2D = a_rSpriteData.mesh2D; #endif //this.physicIsDirty = a_rSpriteData.physicIsDirty; }
// Deep copy constructor public Uni2DEditorSpriteSettings( Uni2DEditorSpriteSettings a_rSpriteSettings ) { this.textureContainer = new Texture2DContainer( a_rSpriteSettings.textureContainer ); // Deep copy this.atlas = a_rSpriteSettings.atlas; this.sharedMaterial = a_rSpriteSettings.sharedMaterial; this.renderMesh = a_rSpriteSettings.renderMesh; this.usePhysicBuildSettings = a_rSpriteSettings.usePhysicBuildSettings; this.spriteScaleMode = a_rSpriteSettings.spriteScaleMode; this.spriteScale = a_rSpriteSettings.spriteScale; this.spriteScaleNotUniform = a_rSpriteSettings.spriteScaleNotUniform; this.pivotType = a_rSpriteSettings.pivotType; this.pivotCustomCoords = a_rSpriteSettings.pivotCustomCoords; this.vertexColor = a_rSpriteSettings.vertexColor; this.dimensionMode = a_rSpriteSettings.dimensionMode; this.physicsMode = a_rSpriteSettings.physicsMode; this.collisionType = a_rSpriteSettings.collisionType; this.isKinematic = a_rSpriteSettings.isKinematic; this.isTrigger = a_rSpriteSettings.isTrigger; this.renderMeshAlphaCutOff = a_rSpriteSettings.renderMeshAlphaCutOff; this.renderMeshPolygonizationAccuracy = a_rSpriteSettings.renderMeshPolygonizationAccuracy; this.renderMeshPolygonizeHoles = a_rSpriteSettings.renderMeshPolygonizeHoles; this.alphaCutOff = a_rSpriteSettings.alphaCutOff; this.extrusionDepth = a_rSpriteSettings.extrusionDepth; this.polygonizationAccuracy = a_rSpriteSettings.polygonizationAccuracy; this.polygonizeHoles = a_rSpriteSettings.polygonizeHoles; this.onlyBorder = a_rSpriteSettings.onlyBorder; this.subdivide = a_rSpriteSettings.subdivide; this.subdivisionCount = a_rSpriteSettings.subdivisionCount; this.renderMeshGridHorizontalSubDivs = a_rSpriteSettings.renderMeshGridHorizontalSubDivs; this.renderMeshGridVerticalSubDivs = a_rSpriteSettings.renderMeshGridVerticalSubDivs; this.skinQuality = a_rSpriteSettings.skinQuality; this.boneInfluenceFalloff = a_rSpriteSettings.boneInfluenceFalloff; }
// Shallow copy constructor public Uni2DEditorSpriteData( Uni2DEditorSpriteData a_rSpriteData ) { this.spriteWidth = a_rSpriteData.spriteWidth; this.spriteHeight = a_rSpriteData.spriteHeight; this.renderMesh = a_rSpriteData.renderMesh; this.renderMeshMaterial = a_rSpriteData.renderMeshMaterial; this.generatedMaterial = a_rSpriteData.generatedMaterial; this.renderMeshVertices = a_rSpriteData.renderMeshVertices; this.renderMeshUVs = a_rSpriteData.renderMeshUVs; this.pivotCoords = a_rSpriteData.pivotCoords; this.scaleMode = a_rSpriteData.scaleMode; this.scale = a_rSpriteData.scale; this.scaleNotUniform = a_rSpriteData.scaleNotUniform; this.colliderTriangleCount = a_rSpriteData.colliderTriangleCount; this.meshCollidersRootGameObject = a_rSpriteData.meshCollidersRootGameObject; this.meshCollidersList = new List<Mesh>( a_rSpriteData.meshCollidersList ); this.meshColliderComponentsList = new List<MeshCollider>( a_rSpriteData.meshColliderComponentsList ); #if AFTER_UNITY_4_3 this.polygonCollider2D = a_rSpriteData.polygonCollider2D; this.mesh2D = a_rSpriteData.mesh2D; #endif //this.physicIsDirty = a_rSpriteData.physicIsDirty; }