public override void Deserialize(BinaryReader binaryReader) { base.Deserialize(binaryReader); clearFlags = (CameraClearFlags)binaryReader.ReadInt32(); cullingMask = binaryReader.ReadInt32(); orthographic = binaryReader.ReadBoolean(); orthographicSize = binaryReader.ReadSingle(); fieldOfView = binaryReader.ReadSingle(); usePhysicalProperties = binaryReader.ReadBoolean(); focalLength = binaryReader.ReadSingle(); sensorType = binaryReader.ReadInt32(); gateFit = (Camera.GateFitMode)binaryReader.ReadInt32(); nearClipPlane = binaryReader.ReadSingle(); farClipPlane = binaryReader.ReadSingle(); depth = binaryReader.ReadSingle(); renderingPath = binaryReader.ReadInt32(); useOcclusionCulling = binaryReader.ReadBoolean(); allowHDR = binaryReader.ReadBoolean(); allowMSAA = binaryReader.ReadBoolean(); allowDynamicResolution = binaryReader.ReadBoolean(); targetEye = binaryReader.ReadInt32(); m_backgroundColor = SerializerKun.DesirializeObject <ColorKun>(binaryReader); m_lensShift = SerializerKun.DesirializeObject <Vector2Kun>(binaryReader); m_rect = SerializerKun.DesirializeObject <RectKun>(binaryReader); }
/// <summary> /// /// </summary> /// <param name="binaryReader"></param> public override void Deserialize(BinaryReader binaryReader) { base.Deserialize(binaryReader); #if UNITY_2019_1_OR_NEWER lightShape = (LightShape)binaryReader.ReadInt32(); colorTemperature = binaryReader.ReadSingle(); useColorTemperature = binaryReader.ReadBoolean(); renderingLayerMask = binaryReader.ReadInt32(); #endif lightType = (LightType)binaryReader.ReadInt32(); range = binaryReader.ReadSingle(); spotAngle = binaryReader.ReadSingle(); innerSpotAngle = binaryReader.ReadSingle(); cookieSize = binaryReader.ReadSingle(); m_colorKun = SerializerKun.DesirializeObject <ColorKun>(binaryReader); intensity = binaryReader.ReadSingle(); bounceIntensity = binaryReader.ReadSingle(); cookie = binaryReader.ReadString(); shadowsType = (LightShadows)binaryReader.ReadInt32(); shadowsStrength = binaryReader.ReadSingle(); shadowsResolution = (UnityEngine.Rendering.LightShadowResolution)binaryReader.ReadInt32(); shadowsBias = binaryReader.ReadSingle(); shadowsNormalBias = binaryReader.ReadSingle(); shadowsNearPlane = binaryReader.ReadSingle(); halo = binaryReader.ReadBoolean(); flare = binaryReader.ReadString(); renderMode = (LightRenderMode)binaryReader.ReadInt32(); cullingMask = binaryReader.ReadInt32(); }
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 override void Deserialize(BinaryReader binaryReader) { base.Deserialize(binaryReader); m_Sprite = SerializerKun.DesirializeObject <SpriteKun>(binaryReader); m_Color = SerializerKun.DesirializeObject <ColorKun>(binaryReader); m_FlipX = binaryReader.ReadBoolean(); m_FlipY = binaryReader.ReadBoolean(); m_DrawMode = (SpriteDrawMode)binaryReader.ReadInt32(); m_MaskInteraction = (SpriteMaskInteraction)binaryReader.ReadInt32(); m_SpriteSortPoint = (SpriteSortPoint)binaryReader.ReadInt32(); }
public LightKun(Component component) : base(component) { componentKunType = BehaviourKun.ComponentKunType.Light; cookie = ""; flare = ""; m_colorKun = new ColorKun(); var light = component as Light; if (light) { #if UNITY_2019_1_OR_NEWER lightShape = light.shape; useColorTemperature = light.useColorTemperature; colorTemperature = light.colorTemperature; renderingLayerMask = light.renderingLayerMask; #endif enabled = light.enabled; lightType = light.type; range = light.range; spotAngle = light.spotAngle; innerSpotAngle = light.spotAngle; cookieSize = light.cookieSize; if (light.cookie != null) { cookie = light.cookie.name; } else { cookie = ""; } if (light.flare != null) { flare = light.flare.name; } else { flare = ""; } color = light.color; intensity = light.intensity; bounceIntensity = light.bounceIntensity; shadowsType = light.shadows; shadowsStrength = light.shadowStrength; shadowsBias = light.shadowBias; shadowsNormalBias = light.shadowNormalBias; shadowsNormalBias = light.shadowNormalBias; // halo renderMode = light.renderMode; cullingMask = light.cullingMask; } }
public SpriteRendererKun(SpriteRenderer spriteRenderer) : base(spriteRenderer) { componentKunType = ComponentKunType.SpriteRenderer; if (spriteRenderer != null) { sprite = new SpriteKun(spriteRenderer.sprite); color = new ColorKun(spriteRenderer.color); flipX = spriteRenderer.flipX; flipY = spriteRenderer.flipY; drawMode = spriteRenderer.drawMode; maskInteraction = spriteRenderer.maskInteraction; spriteSortPoint = spriteRenderer.spriteSortPoint; } }
public override void Deserialize(BinaryReader binaryReader) { base.Deserialize(binaryReader); m_doubleSidedGI = binaryReader.ReadBoolean(); m_enableInstancing = binaryReader.ReadBoolean(); m_mainTexPropIdx = binaryReader.ReadInt32(); m_passCount = binaryReader.ReadInt32(); m_renderQueue = binaryReader.ReadInt32(); m_globalIlluminationFlags = (MaterialGlobalIlluminationFlags)binaryReader.ReadInt32(); m_color = SerializerKun.DesirializeObject <ColorKun>(binaryReader); m_shader = SerializerKun.DesirializeObject <ShaderKun>(binaryReader); m_shaderKeywords = SerializerKun.DesirializeStrings(binaryReader); m_propertys = SerializerKun.DesirializeObjects <Property>(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); }
public override bool Equals(object obj) { ColorKun otherKun = obj as ColorKun; if (a.Equals(otherKun.a) == false) { return(false); } if (b.Equals(otherKun.b) == false) { return(false); } if (g.Equals(otherKun.g) == false) { return(false); } if (r.Equals(otherKun.r) == false) { return(false); } return(true); }
/// <summary> /// コンストラクタ /// </summary> /// <param name="component">Cameraオブジェクト</param> public CameraKun(Component component) : base(component) { componentKunType = ComponentKunType.Camera; m_backgroundColor = new ColorKun(); m_lensShift = new Vector2Kun(); m_rect = new RectKun(); var camera = component as Camera; if (camera != null) { enabled = camera.enabled; clearFlags = camera.clearFlags; backgroundColor = camera.backgroundColor; cullingMask = camera.cullingMask; orthographic = camera.orthographic; orthographicSize = camera.orthographicSize; fieldOfView = camera.fieldOfView; usePhysicalProperties = camera.usePhysicalProperties; focalLength = camera.focalLength; sensorType = System.Array.IndexOf(k_ApertureFormatValues, new Vector2((float)System.Math.Round(camera.sensorSize.x, 3), (float)System.Math.Round(camera.sensorSize.y, 3))); lensShift = camera.lensShift; gateFit = camera.gateFit; nearClipPlane = camera.nearClipPlane; farClipPlane = camera.farClipPlane; rect = camera.rect; depth = camera.depth; renderingPath = (int)camera.renderingPath; useOcclusionCulling = camera.useOcclusionCulling; allowHDR = camera.allowHDR; allowMSAA = camera.allowMSAA; allowDynamicResolution = camera.allowDynamicResolution; targetEye = (int)camera.stereoTargetEye; } }
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); }
/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public override bool Equals(object other) { var otherKun = other as LightKun; if (otherKun == null) { return(false); } #if UNITY_2019_1_OR_NEWER if (lightShape != otherKun.lightShape) { return(false); } if (colorTemperature.Equals(otherKun.colorTemperature) == false) { return(false); } if (useColorTemperature.Equals(otherKun.useColorTemperature) == false) { return(false); } if (renderingLayerMask.Equals(otherKun.renderingLayerMask) == false) { return(false); } #endif if (lightType.Equals(otherKun.lightType) == false) { return(false); } if (range.Equals(otherKun.range) == false) { return(false); } if (spotAngle.Equals(otherKun.spotAngle) == false) { return(false); } if (innerSpotAngle.Equals(otherKun.innerSpotAngle) == false) { return(false); } if (cookieSize.Equals(otherKun.cookieSize) == false) { return(false); } if (!ColorKun.Equals(m_colorKun, otherKun.m_colorKun)) { return(false); } if (intensity.Equals(otherKun.intensity) == false) { return(false); } if (bounceIntensity.Equals(otherKun.bounceIntensity) == false) { return(false); } if (cookie.Equals(otherKun.cookie) == false) { return(false); } if (shadowsType.Equals(otherKun.shadowsType) == false) { return(false); } if (shadowsStrength.Equals(otherKun.shadowsStrength) == false) { return(false); } if (shadowsResolution.Equals(otherKun.shadowsResolution) == false) { return(false); } if (shadowsBias.Equals(otherKun.shadowsBias) == false) { return(false); } if (shadowsNormalBias.Equals(otherKun.shadowsNormalBias) == false) { return(false); } if (shadowsNearPlane.Equals(otherKun.shadowsNearPlane) == false) { return(false); } if (halo.Equals(otherKun.halo) == false) { return(false); } if (flare.Equals(otherKun.flare) == false) { return(false); } if (renderMode.Equals(otherKun.renderMode) == false) { return(false); } if (cullingMask.Equals(otherKun.cullingMask) == false) { return(false); } return(true); }