Beispiel #1
0
 /// <summary>
 /// Serialize
 /// </summary>
 /// <param name="binaryWriter">BinaryWriter</param>
 public override void Serialize(BinaryWriter binaryWriter)
 {
     base.Serialize(binaryWriter);
     SerializerKun.Serialize <MainModuleKun>(binaryWriter, main);
     binaryWriter.Write(emission);
     binaryWriter.Write(shape);
     binaryWriter.Write(velocityOverLifetime);
     binaryWriter.Write(limitVelocityOverLifetime);
     binaryWriter.Write(inheritVelocity);
     binaryWriter.Write(forceOverLifetime);
     binaryWriter.Write(colorOverLifetime);
     binaryWriter.Write(colorBySpeed);
     binaryWriter.Write(sizeOverLifetime);
     binaryWriter.Write(sizeBySpeed);
     binaryWriter.Write(rotationOverLifetime);
     binaryWriter.Write(rotationBySpeed);
     binaryWriter.Write(externalForces);
     binaryWriter.Write(noise);
     binaryWriter.Write(collision);
     binaryWriter.Write(trigger);
     binaryWriter.Write(subEmitters);
     binaryWriter.Write(textureSheetAnimation);
     binaryWriter.Write(trails);
     binaryWriter.Write(customData);
     binaryWriter.Write(isEmitting);
     binaryWriter.Write(isPaused);
     binaryWriter.Write(isPlaying);
     binaryWriter.Write(isStopped);
 }
Beispiel #2
0
        /// <summary>
        /// Deserialize
        /// </summary>
        /// <param name="binaryReader">BinaryReader</param>
        public override void Deserialize(BinaryReader binaryReader)
        {
            base.Deserialize(binaryReader);
            main                      = SerializerKun.DesirializeObject <MainModuleKun>(binaryReader);
            emission                  = binaryReader.ReadBoolean();
            shape                     = binaryReader.ReadBoolean();
            velocityOverLifetime      = binaryReader.ReadBoolean();
            limitVelocityOverLifetime = binaryReader.ReadBoolean();
            inheritVelocity           = binaryReader.ReadBoolean();
            forceOverLifetime         = binaryReader.ReadBoolean();
            colorOverLifetime         = binaryReader.ReadBoolean();
            colorBySpeed              = binaryReader.ReadBoolean();
            sizeOverLifetime          = binaryReader.ReadBoolean();
            sizeBySpeed               = binaryReader.ReadBoolean();

            rotationOverLifetime = binaryReader.ReadBoolean();
            rotationBySpeed      = binaryReader.ReadBoolean();
            externalForces       = binaryReader.ReadBoolean();
            noise                 = binaryReader.ReadBoolean();
            collision             = binaryReader.ReadBoolean();
            trigger               = binaryReader.ReadBoolean();
            subEmitters           = binaryReader.ReadBoolean();
            textureSheetAnimation = binaryReader.ReadBoolean();
            trails                = binaryReader.ReadBoolean();
            customData            = binaryReader.ReadBoolean();
            isEmitting            = binaryReader.ReadBoolean();
            isPaused              = binaryReader.ReadBoolean();
            isPlaying             = binaryReader.ReadBoolean();
            isStopped             = binaryReader.ReadBoolean();
        }
Beispiel #3
0
 public override void Serialize(BinaryWriter binaryWriter)
 {
     base.Serialize(binaryWriter);
     binaryWriter.Write((Int32)clearFlags);
     binaryWriter.Write(cullingMask);
     binaryWriter.Write(orthographic);
     binaryWriter.Write(orthographicSize);
     binaryWriter.Write(fieldOfView);
     binaryWriter.Write(usePhysicalProperties);
     binaryWriter.Write(focalLength);
     binaryWriter.Write(sensorType);
     binaryWriter.Write((Int32)gateFit);
     binaryWriter.Write(nearClipPlane);
     binaryWriter.Write(farClipPlane);
     binaryWriter.Write(depth);
     binaryWriter.Write(renderingPath);
     binaryWriter.Write(useOcclusionCulling);
     binaryWriter.Write(allowHDR);
     binaryWriter.Write(allowMSAA);
     binaryWriter.Write(allowDynamicResolution);
     binaryWriter.Write(targetEye);
     SerializerKun.Serialize <ColorKun>(binaryWriter, m_backgroundColor);
     SerializerKun.Serialize <Vector2Kun>(binaryWriter, m_lensShift);
     SerializerKun.Serialize <RectKun>(binaryWriter, m_rect);
 }
Beispiel #4
0
 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);
 }
Beispiel #5
0
        /// <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();
        }
Beispiel #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="binaryWriter"></param>
        public override void Serialize(BinaryWriter binaryWriter)
        {
            base.Serialize(binaryWriter);
#if UNITY_2019_1_OR_NEWER
            binaryWriter.Write((int)lightShape);
            binaryWriter.Write(colorTemperature);
            binaryWriter.Write(useColorTemperature);
            binaryWriter.Write(renderingLayerMask);
#endif
            binaryWriter.Write((int)lightType);
            binaryWriter.Write(range);
            binaryWriter.Write(spotAngle);
            binaryWriter.Write(innerSpotAngle);
            binaryWriter.Write(cookieSize);

            SerializerKun.Serialize <ColorKun>(binaryWriter, m_colorKun);

            binaryWriter.Write(intensity);
            binaryWriter.Write(bounceIntensity);
            binaryWriter.Write(cookie);
            binaryWriter.Write((int)shadowsType);
            binaryWriter.Write(shadowsStrength);
            binaryWriter.Write((int)shadowsResolution);
            binaryWriter.Write(shadowsBias);
            binaryWriter.Write(shadowsNormalBias);
            binaryWriter.Write(shadowsNearPlane);
            binaryWriter.Write(halo);
            binaryWriter.Write(flare);
            binaryWriter.Write((int)renderMode);
            binaryWriter.Write(cullingMask);
        }
Beispiel #7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            var other = obj as AndroidKun;

            if (other == null)
            {
                return(false);
            }
            if (!m_isSustainedPerformanceMode.Equals(other.m_isSustainedPerformanceMode))
            {
                return(false);
            }
            if (!m_requestSustainedPerformanceMode.Equals(other.m_requestSustainedPerformanceMode))
            {
                return(false);
            }

            if (!SerializerKun.Equals <bool>(m_hasUserAuthorizedPermissions, other.m_hasUserAuthorizedPermissions))
            {
                return(false);
            }

            if (!SerializerKun.Equals <bool>(m_requestUserPermissions, other.m_requestUserPermissions))
            {
                return(false);
            }

            if (!SerializerKun.Equals <string>(m_permissions, other.m_permissions))
            {
                return(false);
            }

            return(true);
        }
Beispiel #8
0
        /// <summary>
        /// Serialize
        /// </summary>
        /// <param name="binaryWriter">BinaryWriter</param>
        public virtual void Serialize(BinaryWriter binaryWriter)
        {
            binaryWriter.Write(m_currentResolutionWidth);
            binaryWriter.Write(m_currentResolutionHeight);
            binaryWriter.Write(m_currentResolutionRefreshRate);
            binaryWriter.Write(m_width);
            binaryWriter.Write(m_height);
            binaryWriter.Write(m_sleepTimeout);
            binaryWriter.Write(m_preferredRefreshRate);
            binaryWriter.Write(m_autorotateToLandscapeLeft);
            binaryWriter.Write(m_autorotateToLandscapeRight);
            binaryWriter.Write(m_autorotateToPortrait);
            binaryWriter.Write(m_autorotateToPortraitUpsideDown);
            binaryWriter.Write(m_fullScreen);

#if UNITY_2019_1_OR_NEWER
            binaryWriter.Write(m_brightness);
#endif

            binaryWriter.Write(m_dpi);
            binaryWriter.Write((int)m_fullScreenMode);
            binaryWriter.Write((int)m_orientation);

            SerializerKun.Serialize <RectKun>(binaryWriter, m_safeArea);
#if UNITY_2019_1_OR_NEWER
            SerializerKun.Serialize <RectKun>(binaryWriter, m_cutouts);
#endif
            SerializerKun.Serialize <ResolutionKun>(binaryWriter, m_resolutions);
        }
Beispiel #9
0
        /// <summary>
        /// Deserialize
        /// </summary>
        /// <param name="binaryReader">BinaryReader</param>
        public virtual void Deserialize(BinaryReader binaryReader)
        {
            m_currentResolutionWidth       = binaryReader.ReadInt32();
            m_currentResolutionHeight      = binaryReader.ReadInt32();
            m_currentResolutionRefreshRate = binaryReader.ReadInt32();
            m_width                          = binaryReader.ReadInt32();
            m_height                         = binaryReader.ReadInt32();
            m_sleepTimeout                   = binaryReader.ReadInt32();
            m_preferredRefreshRate           = binaryReader.ReadInt32();
            m_autorotateToLandscapeLeft      = binaryReader.ReadBoolean();
            m_autorotateToLandscapeRight     = binaryReader.ReadBoolean();
            m_autorotateToPortrait           = binaryReader.ReadBoolean();
            m_autorotateToPortraitUpsideDown = binaryReader.ReadBoolean();
            m_fullScreen                     = binaryReader.ReadBoolean();
#if UNITY_2019_1_OR_NEWER
            m_brightness = binaryReader.ReadSingle();
#endif
            m_dpi            = binaryReader.ReadSingle();
            m_fullScreenMode = (FullScreenMode)binaryReader.ReadInt32();
            m_orientation    = (ScreenOrientation)binaryReader.ReadInt32();
            m_safeArea       = SerializerKun.DesirializeObject <RectKun>(binaryReader);
#if UNITY_2019_1_OR_NEWER
            m_cutouts = SerializerKun.DesirializeObjects <RectKun>(binaryReader);
#endif
            m_resolutions = SerializerKun.DesirializeObjects <ResolutionKun>(binaryReader);
        }
Beispiel #10
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="binaryReader"></param>
 public override void Deserialize(BinaryReader binaryReader)
 {
     base.Deserialize(binaryReader);
     m_center  = SerializerKun.DesirializeObject <Vector3Kun>(binaryReader);
     direction = binaryReader.ReadInt32();
     height    = binaryReader.ReadSingle();
     radius    = binaryReader.ReadSingle();
 }
Beispiel #11
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="binaryWriter"></param>
 public virtual void Serialize(BinaryWriter binaryWriter)
 {
     binaryWriter.Write(m_isSustainedPerformanceMode);
     binaryWriter.Write(m_requestSustainedPerformanceMode);
     SerializerKun.Serialize(binaryWriter, m_hasUserAuthorizedPermissions);
     SerializerKun.Serialize(binaryWriter, m_requestUserPermissions);
     SerializerKun.Serialize(binaryWriter, m_permissions);
 }
Beispiel #12
0
 /// <summary>
 /// Deserialize
 /// </summary>
 /// <param name="binaryReader">BinaryReader</param>
 public virtual void Deserialize(BinaryReader binaryReader)
 {
     m_isSustainedPerformanceMode      = binaryReader.ReadBoolean();
     m_requestSustainedPerformanceMode = binaryReader.ReadBoolean();
     m_hasUserAuthorizedPermissions    = SerializerKun.DesirializeBooleans(binaryReader);
     m_requestUserPermissions          = SerializerKun.DesirializeBooleans(binaryReader);
     m_permissions = SerializerKun.DesirializeStrings(binaryReader);
 }
Beispiel #13
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="binaryWriter"></param>
 public override void Serialize(BinaryWriter binaryWriter)
 {
     base.Serialize(binaryWriter);
     SerializerKun.Serialize <Vector3Kun>(binaryWriter, m_center);
     binaryWriter.Write(direction);
     binaryWriter.Write(height);
     binaryWriter.Write(radius);
 }
Beispiel #14
0
 /// <summary>
 /// Serialize
 /// </summary>
 /// <param name="binaryWriter">BinaryWriter</param>
 public override void Serialize(BinaryWriter binaryWriter)
 {
     base.Serialize(binaryWriter);
     SerializerKun.Serialize <BoundsKun>(binaryWriter, m_bounds);
     binaryWriter.Write(contactOffset);
     binaryWriter.Write(enabled);
     binaryWriter.Write(isTrigger);
     binaryWriter.Write(material);
 }
Beispiel #15
0
 /// <summary>
 /// Deserialize
 /// </summary>
 /// <param name="binaryReader">BinaryReader</param>
 public override void Deserialize(BinaryReader binaryReader)
 {
     base.Deserialize(binaryReader);
     m_bounds      = SerializerKun.DesirializeObject <BoundsKun>(binaryReader);
     contactOffset = binaryReader.ReadSingle();
     enabled       = binaryReader.ReadBoolean();
     isTrigger     = binaryReader.ReadBoolean();
     material      = binaryReader.ReadString();
 }
Beispiel #16
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="binaryReader"></param>
        public override void Deserialize(BinaryReader binaryReader)
        {
            base.Deserialize(binaryReader);

            m_localPosition    = SerializerKun.DesirializeObject <Vector3Kun>(binaryReader);
            m_localScale       = SerializerKun.DesirializeObject <Vector3Kun>(binaryReader);
            m_localRotation    = SerializerKun.DesirializeObject <Vector3Kun>(binaryReader);
            m_parentInstanceID = binaryReader.ReadInt32();
            m_childCount       = binaryReader.ReadInt32();
        }
Beispiel #17
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="binaryWriter"></param>
        public override void Serialize(BinaryWriter binaryWriter)
        {
            base.Serialize(binaryWriter);

            SerializerKun.Serialize <Vector3Kun>(binaryWriter, m_localPosition);
            SerializerKun.Serialize <Vector3Kun>(binaryWriter, m_localScale);
            SerializerKun.Serialize <Vector3Kun>(binaryWriter, m_localRotation);
            binaryWriter.Write(m_parentInstanceID);
            binaryWriter.Write(m_childCount);
        }
 /// <summary>
 /// Serialize
 /// </summary>
 /// <param name="binaryWriter">BinaryWriter</param>
 public override void Serialize(BinaryWriter binaryWriter)
 {
     base.Serialize(binaryWriter);
     binaryWriter.Write(sharedMesh);
     binaryWriter.Write((int)m_quality);
     binaryWriter.Write(m_forceMatrixRecalculationPerRender);
     binaryWriter.Write(m_skinnedMotionVectors);
     binaryWriter.Write(m_updateWhenOffscreen);
     SerializerKun.Serialize <BoundsKun>(binaryWriter, m_localBounds);
     SerializerKun.Serialize <TransformKun>(binaryWriter, m_bones);
 }
Beispiel #19
0
 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();
 }
Beispiel #20
0
 public override void Serialize(BinaryWriter binaryWriter)
 {
     base.Serialize(binaryWriter);
     SerializerKun.Serialize <SpriteKun>(binaryWriter, m_Sprite);
     SerializerKun.Serialize <ColorKun>(binaryWriter, m_Color);
     binaryWriter.Write(m_FlipX);
     binaryWriter.Write(m_FlipY);
     binaryWriter.Write((int)m_DrawMode);
     binaryWriter.Write((int)m_MaskInteraction);
     binaryWriter.Write((int)m_SpriteSortPoint);
 }
        /// <summary>
        /// Deserialize
        /// </summary>
        /// <param name="binaryReader">BinaryReader</param>
        public override void Deserialize(BinaryReader binaryReader)
        {
            base.Deserialize(binaryReader);

            m_sharedMesh = binaryReader.ReadString();
            m_quality    = (SkinQuality)binaryReader.ReadInt32();
            m_forceMatrixRecalculationPerRender = binaryReader.ReadBoolean();
            m_skinnedMotionVectors = binaryReader.ReadBoolean();
            m_updateWhenOffscreen  = binaryReader.ReadBoolean();
            m_localBounds          = SerializerKun.DesirializeObject <BoundsKun>(binaryReader);
            m_bones = SerializerKun.DesirializeObjects <TransformKun>(binaryReader);
        }
Beispiel #22
0
        public override void Serialize(BinaryWriter binaryWriter)
        {
            base.Serialize(binaryWriter);

            binaryWriter.Write((int)renderMode);
            binaryWriter.Write(pixelPerfect);
            binaryWriter.Write(sortingOrder);
            binaryWriter.Write(targetDisplay);
            binaryWriter.Write((int)additionalShaderChannels);
            SerializerKun.Serialize <CameraKun>(binaryWriter, worldCamera);
            binaryWriter.Write(sortingLayerID);
            binaryWriter.Write(sortingLayerName);
        }
Beispiel #23
0
 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_shader         = SerializerKun.DesirializeObject <ShaderKun>(binaryReader);
     m_shaderKeywords = SerializerKun.DesirializeStrings(binaryReader);
     m_propertys      = SerializerKun.DesirializeObjects <Property>(binaryReader);
 }
Beispiel #24
0
 public override void Serialize(BinaryWriter binaryWriter)
 {
     base.Serialize(binaryWriter);
     binaryWriter.Write(m_doubleSidedGI);
     binaryWriter.Write(m_enableInstancing);
     binaryWriter.Write(m_mainTexPropIdx);
     binaryWriter.Write(m_passCount);
     binaryWriter.Write(m_renderQueue);
     binaryWriter.Write((int)m_globalIlluminationFlags);
     SerializerKun.Serialize <ShaderKun>(binaryWriter, m_shader);
     SerializerKun.Serialize(binaryWriter, m_shaderKeywords);
     SerializerKun.Serialize <Property>(binaryWriter, m_propertys);
 }
Beispiel #25
0
        public override void Deserialize(BinaryReader binaryReader)
        {
            base.Deserialize(binaryReader);

            renderMode               = (RenderMode)binaryReader.ReadInt32();
            pixelPerfect             = binaryReader.ReadBoolean();
            sortingOrder             = binaryReader.ReadInt32();
            targetDisplay            = binaryReader.ReadInt32();
            additionalShaderChannels = (AdditionalCanvasShaderChannels)binaryReader.ReadInt32();
            worldCamera              = SerializerKun.DesirializeObject <CameraKun>(binaryReader);
            sortingLayerID           = binaryReader.ReadInt32();
            sortingLayerName         = binaryReader.ReadString();
        }
Beispiel #26
0
 public void Serialize(BinaryWriter binaryWriter)
 {
     binaryWriter.Write((uint)m_flags);
     binaryWriter.Write((int)m_textureDimension);
     binaryWriter.Write((int)m_type);
     binaryWriter.Write(m_description);
     binaryWriter.Write(m_name);
     binaryWriter.Write(m_textureDefaultName);
     binaryWriter.Write(m_nameId);
     binaryWriter.Write(m_defaultFloatValue);
     SerializerKun.Serialize(binaryWriter, m_attributes);
     SerializerKun.Serialize <Vector2Kun>(binaryWriter, m_rangeLimits);
     SerializerKun.Serialize <Vector4Kun>(binaryWriter, m_defaultVectorValue);
 }
Beispiel #27
0
            /// <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);
            }
Beispiel #28
0
            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);
            }
Beispiel #29
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="binaryWriter"></param>
            public virtual void Serialize(BinaryWriter binaryWriter)
            {
#if UNITY_2019_1_OR_NEWER
                binaryWriter.Write((int)m_flags);
                binaryWriter.Write((int)m_type);
#endif
                binaryWriter.Write((int)m_textureDimension);
                binaryWriter.Write(m_dirty);
                binaryWriter.Write(m_nameId);
                binaryWriter.Write(m_floatValue);
                binaryWriter.Write(m_displayName);
                binaryWriter.Write(m_name);
                SerializerKun.Serialize <ColorKun>(binaryWriter, m_colorValue);
                SerializerKun.Serialize <TextureKun>(binaryWriter, m_textureValue);
                SerializerKun.Serialize <Vector2Kun>(binaryWriter, m_rangeLimits);
                SerializerKun.Serialize <Vector2Kun>(binaryWriter, m_scale);
                SerializerKun.Serialize <Vector2Kun>(binaryWriter, m_offset);
                SerializerKun.Serialize <Vector4Kun>(binaryWriter, m_vectorValue);
            }
        /// <summary>
        ///
        /// </summary>
        /// <param name="binaryReader"></param>
        public virtual void Deserialize(BinaryReader binaryReader)
        {
            activeColorSpace             = (ColorSpace)binaryReader.ReadInt32();
            anisotropicFiltering         = (AnisotropicFiltering)binaryReader.ReadInt32();
            antiAliasing                 = binaryReader.ReadInt32();
            asyncUploadBufferSize        = binaryReader.ReadInt32();
            asyncUploadPersistentBuffer  = binaryReader.ReadBoolean();
            asyncUploadTimeSlice         = binaryReader.ReadInt32();
            billboardsFaceCameraPosition = binaryReader.ReadBoolean();
            desiredColorSpace            = (ColorSpace)binaryReader.ReadInt32();
            lodBias            = binaryReader.ReadSingle();
            masterTextureLimit = binaryReader.ReadInt32();
            maximumLODLevel    = binaryReader.ReadInt32();
            maxQueuedFrames    = binaryReader.ReadInt32();
            names = SerializerKun.DesirializeStrings(binaryReader);
            particleRaycastBudget           = binaryReader.ReadInt32();
            pixelLightCount                 = binaryReader.ReadInt32();
            realtimeReflectionProbes        = binaryReader.ReadBoolean();
            resolutionScalingFixedDPIFactor = binaryReader.ReadSingle();
            shadowCascade2Split             = binaryReader.ReadSingle();
            mShadowCascade4Split            = SerializerKun.DesirializeObject <Vector3Kun>(binaryReader);
            shadowCascades        = binaryReader.ReadInt32();
            shadowDistance        = binaryReader.ReadSingle();
            shadowmaskMode        = (ShadowmaskMode)binaryReader.ReadInt32();
            shadowNearPlaneOffset = binaryReader.ReadSingle();
            shadowProjection      = (ShadowProjection)binaryReader.ReadInt32();
            shadowResolution      = (ShadowResolution)binaryReader.ReadInt32();
            shadows = (ShadowQuality)binaryReader.ReadInt32();
#if UNITY_2019_1_OR_NEWER
            skinWeights = (SkinWeights)binaryReader.ReadInt32();
#endif
            softParticles                     = binaryReader.ReadBoolean();
            softVegetation                    = binaryReader.ReadBoolean();
            streamingMipmapsActive            = binaryReader.ReadBoolean();
            streamingMipmapsAddAllCameras     = binaryReader.ReadBoolean();
            streamingMipmapsMaxFileIORequests = binaryReader.ReadInt32();
            streamingMipmapsMaxLevelReduction = binaryReader.ReadInt32();
            streamingMipmapsMemoryBudget      = binaryReader.ReadSingle();
            streamingMipmapsRenderersPerFrame = binaryReader.ReadInt32();
            vSyncCount = binaryReader.ReadInt32();
            isDirty    = binaryReader.ReadBoolean();
        }