/// <summary> /// /// </summary> /// <param name="column0"></param> /// <param name="column1"></param> /// <param name="column2"></param> /// <param name="column3"></param> public Matrix4x4Kun(Vector4Kun column0, Vector4Kun column1, Vector4Kun column2, Vector4Kun column3) { columns = new Vector4Kun[4]; columns[0] = column0; columns[1] = column1; columns[2] = column2; columns[3] = column3; }
public Property() { m_description = ""; m_name = ""; m_rangeLimits = new Vector2Kun(); m_textureDefaultName = ""; m_defaultVectorValue = new Vector4Kun(); }
public Property() { dirty = false; m_colorValue = new ColorKun(); m_textureValue = new TextureKun(); m_vectorValue = new Vector4Kun(); m_scale = new Vector2Kun(); m_offset = new Vector2Kun(); }
public SpriteKun(Sprite sprite) : base(sprite) { if (sprite != null) { name = sprite.name; pivot = new Vector2Kun(sprite.pivot); border = new Vector4Kun(sprite.border); } else { pivot = new Vector2Kun(); border = new Vector4Kun(); } }
/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public override bool Equals(object other) { Vector4Kun v4 = other as Vector4Kun; if (other == null) { return(false); } if (w != v4.w) { return(false); } return(base.Equals(other)); }
/// <summary> /// /// </summary> /// <param name="binaryReader"></param> public virtual void Deserialize(BinaryReader binaryReader) { m_flags = (UnityEngine.Rendering.ShaderPropertyFlags)binaryReader.ReadUInt32(); m_textureDimension = (UnityEngine.Rendering.TextureDimension)binaryReader.ReadInt32(); m_type = (UnityEngine.Rendering.ShaderPropertyType)binaryReader.ReadInt32(); m_description = binaryReader.ReadString(); m_name = binaryReader.ReadString(); m_textureDefaultName = binaryReader.ReadString(); m_nameId = binaryReader.ReadInt32(); m_defaultFloatValue = binaryReader.ReadSingle(); m_attributes = SerializerKun.DesirializeStrings(binaryReader); m_rangeLimits = SerializerKun.DesirializeObject <Vector2Kun>(binaryReader); m_defaultVectorValue = SerializerKun.DesirializeObject <Vector4Kun>(binaryReader); }
public virtual void Deserialize(BinaryReader binaryReader) { #if UNITY_2019_1_OR_NEWER m_flags = (UnityEngine.Rendering.ShaderPropertyFlags)binaryReader.ReadInt32(); m_type = (UnityEngine.Rendering.ShaderPropertyType)binaryReader.ReadInt32(); #endif m_textureDimension = (UnityEngine.Rendering.TextureDimension)binaryReader.ReadInt32(); m_dirty = binaryReader.ReadBoolean(); m_nameId = binaryReader.ReadInt32(); m_floatValue = binaryReader.ReadSingle(); m_displayName = binaryReader.ReadString(); m_name = binaryReader.ReadString(); m_colorValue = SerializerKun.DesirializeObject <ColorKun>(binaryReader); m_textureValue = SerializerKun.DesirializeObject <TextureKun>(binaryReader); m_rangeLimits = SerializerKun.DesirializeObject <Vector2Kun>(binaryReader); m_scale = SerializerKun.DesirializeObject <Vector2Kun>(binaryReader); m_offset = SerializerKun.DesirializeObject <Vector2Kun>(binaryReader); m_vectorValue = SerializerKun.DesirializeObject <Vector4Kun>(binaryReader); }
/// <summary> /// /// </summary> /// <param name="binaryReader"></param> public override void Deserialize(BinaryReader binaryReader) { base.Deserialize(binaryReader); #if UNITY_2019_1_OR_NEWER m_forceRenderingOff = binaryReader.ReadBoolean(); m_rayTracingMode = (UnityEngine.Experimental.Rendering.RayTracingMode)binaryReader.ReadInt32(); #endif m_lightProbeUsage = (UnityEngine.Rendering.LightProbeUsage)binaryReader.ReadInt32(); m_motionVectorGenerationMode = (MotionVectorGenerationMode)binaryReader.ReadInt32(); m_reflectionProbeUsage = (UnityEngine.Rendering.ReflectionProbeUsage)binaryReader.ReadInt32(); m_shadowCastingMode = (UnityEngine.Rendering.ShadowCastingMode)binaryReader.ReadInt32(); m_lightmapIndex = binaryReader.ReadInt32(); m_rendererPriority = binaryReader.ReadInt32(); m_realtimeLightmapIndex = binaryReader.ReadInt32(); m_sortingLayerID = binaryReader.ReadInt32(); m_sortingOrder = binaryReader.ReadInt32(); m_renderingLayerMask = binaryReader.ReadUInt32(); m_lightProbeProxyVolumeOverride = binaryReader.ReadString(); m_sortingLayerName = binaryReader.ReadString(); m_receiveShadows = binaryReader.ReadBoolean(); m_allowOcclusionWhenDynamic = binaryReader.ReadBoolean(); m_enabled = binaryReader.ReadBoolean(); m_isPartOfStaticBatch = binaryReader.ReadBoolean(); m_isVisible = binaryReader.ReadBoolean(); m_bounds = SerializerKun.DesirializeObject <BoundsKun>(binaryReader); m_probeAnchor = SerializerKun.DesirializeObject <TransformKun>(binaryReader); m_lightmapScaleOffset = SerializerKun.DesirializeObject <Vector4Kun>(binaryReader); m_realtimeLightmapScaleOffset = SerializerKun.DesirializeObject <Vector4Kun>(binaryReader); m_localToWorldMatrix = SerializerKun.DesirializeObject <Matrix4x4Kun>(binaryReader); m_worldToLocalMatrix = SerializerKun.DesirializeObject <Matrix4x4Kun>(binaryReader); m_material = SerializerKun.DesirializeObject <MaterialKun>(binaryReader); m_sharedMaterial = SerializerKun.DesirializeObject <MaterialKun>(binaryReader); m_materials = SerializerKun.DesirializeObjects <MaterialKun>(binaryReader); m_sharedMaterials = SerializerKun.DesirializeObjects <MaterialKun>(binaryReader); }
/// <summary> /// /// </summary> /// <param name="component"></param> public RendererKun(Component component) : base(component) { componentKunType = ComponentKunType.Renderer; m_bounds = new BoundsKun(); m_lightmapScaleOffset = new Vector4Kun(); m_lightProbeProxyVolumeOverride = ""; m_localToWorldMatrix = new Matrix4x4Kun(); m_probeAnchor = new TransformKun(); m_realtimeLightmapScaleOffset = new Vector4Kun(); m_worldToLocalMatrix = new Matrix4x4Kun(); m_sortingLayerName = ""; var renderer = component as Renderer; if (renderer) { #if UNITY_2019_1_OR_NEWER forceRenderingOff = renderer.forceRenderingOff; rayTracingMode = renderer.rayTracingMode; #endif allowOcclusionWhenDynamic = renderer.allowOcclusionWhenDynamic; bounds = renderer.bounds; enabled = renderer.enabled; isPartOfStaticBatch = renderer.isPartOfStaticBatch; isVisible = renderer.isVisible; lightmapIndex = renderer.lightmapIndex; lightmapScaleOffset = renderer.lightmapScaleOffset; if (renderer.lightProbeProxyVolumeOverride) { lightProbeProxyVolumeOverride = renderer.lightProbeProxyVolumeOverride.ToString(); } lightProbeUsage = renderer.lightProbeUsage; localToWorldMatrix = renderer.localToWorldMatrix; #if !UNITY_EDITOR if (renderer.material != null) { material = new MaterialKun(renderer.material); } if (renderer.materials != null) { materials = new MaterialKun[renderer.materials.Length]; for (var i = 0; i < renderer.materials.Length; i++) { materials[i] = new MaterialKun(renderer.materials[i]); } } #endif motionVectorGenerationMode = renderer.motionVectorGenerationMode; if (renderer.probeAnchor != null) { probeAnchor = new TransformKun(renderer.probeAnchor); } realtimeLightmapIndex = renderer.realtimeLightmapIndex; realtimeLightmapScaleOffset = renderer.realtimeLightmapScaleOffset; rendererPriority = renderer.rendererPriority; renderingLayerMask = renderer.renderingLayerMask; shadowCastingMode = renderer.shadowCastingMode; sharedMaterial = new MaterialKun(renderer.sharedMaterial); if (renderer.sharedMaterials != null) { sharedMaterials = new MaterialKun[renderer.sharedMaterials.Length]; for (var i = 0; i < renderer.sharedMaterials.Length; i++) { sharedMaterials[i] = new MaterialKun(renderer.sharedMaterials[i]); } } sortingLayerID = renderer.sortingLayerID; sortingLayerName = renderer.sortingLayerName; sortingOrder = renderer.sortingOrder; worldToLocalMatrix = renderer.worldToLocalMatrix; } }
public override bool Equals(object obj) { var other = obj as Property; if (other == null) { return(false); } #if UNITY_2019_1_OR_NEWER if (flags.Equals(other.flags) == false) { return(false); } if (type.Equals(other.type) == false) { return(false); } #endif if (dirty.Equals(other.dirty) == false) { return(false); } if (!ColorKun.Equals(m_colorValue, other.m_colorValue)) { return(false); } if (!string.Equals(displayName, other.displayName)) { return(false); } if (floatValue.Equals(other.floatValue) == false) { return(false); } if (!string.Equals(name, other.name)) { return(false); } if (nameId.Equals(other.nameId) == false) { return(false); } if (!Vector2Kun.Equals(m_rangeLimits, other.m_rangeLimits)) { return(false); } if (textureDimension.Equals(other.textureDimension) == false) { return(false); } if (!TextureKun.Equals(m_textureValue, other.m_textureValue)) { return(false); } if (!Vector4Kun.Equals(m_vectorValue, other.m_vectorValue)) { return(false); } if (!Vector2Kun.Equals(m_scale, other.m_scale)) { return(false); } if (!Vector2Kun.Equals(m_offset, other.m_offset)) { return(false); } return(true); }
public override void Deserialize(BinaryReader binaryReader) { base.Deserialize(binaryReader); pivot = SerializerKun.DesirializeObject <Vector2Kun>(binaryReader); border = SerializerKun.DesirializeObject <Vector4Kun>(binaryReader); }