コード例 #1
0
        public override void Read(AssetStream stream)
        {
            base.Read(stream);

            ClearFlags = stream.ReadUInt32();
            BackGroundColor.Read(stream);
            if (IsReadProjectionMatrixMode(stream.Version))
            {
                ProjectionMatrixMode = (ProjectionMatrixMode)stream.ReadInt32();
                SensorSize.Read(stream);
                LensShift.Read(stream);
                FocalLength = stream.ReadSingle();
            }
            NormalizedViewPortRect.Read(stream);
            NearClipPlane = stream.ReadSingle();
            FarClipPlane  = stream.ReadSingle();
            FieldOfView   = stream.ReadSingle();
            Orthographic  = stream.ReadBoolean();
            stream.AlignStream(AlignType.Align4);

            OrthographicSize = stream.ReadSingle();
            Depth            = stream.ReadSingle();
            CullingMask.Read(stream);
            if (IsReadRenderingPath(stream.Version))
            {
                RenderingPath = (RenderingPath)stream.ReadInt32();
            }
            TargetTexture.Read(stream);
            if (IsReadTargetDisplay(stream.Version))
            {
                TargetDisplay = stream.ReadInt32();
            }
            if (IsReadTargetEye(stream.Version))
            {
                TargetEye = (StereoTargetEyeMask)stream.ReadInt32();
            }
            if (IsReadHDR(stream.Version))
            {
                HDR = stream.ReadBoolean();
            }
            if (IsReadAllowMSAA(stream.Version))
            {
                AllowMSAA = stream.ReadBoolean();
            }
            if (IsReadAllowDynamicResolution(stream.Version))
            {
                AllowDynamicResolution = stream.ReadBoolean();
            }
            if (IsReadForceIntoRT(stream.Version))
            {
                ForceIntoRT = stream.ReadBoolean();
            }
            if (IsReadOcclusionCulling(stream.Version))
            {
                OcclusionCulling = stream.ReadBoolean();
            }
            if (IsAlign(stream.Version))
            {
                stream.AlignStream(AlignType.Align4);
            }
            if (IsReadStereoConvergence(stream.Version))
            {
                StereoConvergence = stream.ReadSingle();
                StereoSeparation  = stream.ReadSingle();
            }
            if (IsReadStereoMirrorMode(stream.Version))
            {
                StereoMirrorMode = stream.ReadBoolean();
            }
        }
コード例 #2
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            Type = (LightType)reader.ReadInt32();
            Color.Read(reader);
            if (IsReadAttenuate(reader.Version))
            {
                Attenuate = reader.ReadBoolean();
                if (IsAlign(reader.Version))
                {
                    reader.AlignStream(AlignType.Align4);
                }
            }
            if (IsReadIntensity(reader.Version))
            {
                Intensity = reader.ReadSingle();
            }
            Range     = reader.ReadSingle();
            SpotAngle = reader.ReadSingle();
            if (IsReadCookieSize(reader.Version))
            {
                CookieSize = reader.ReadSingle();
            }
            if (IsReadShadows(reader.Version))
            {
                Shadows.Read(reader);
            }
            Cookie.Read(reader);
            DrawHalo = reader.ReadBoolean();
            if (IsReadActuallyLightmapped(reader.Version))
            {
                ActuallyLightmapped = reader.ReadBoolean();
            }
            if (IsAlign(reader.Version))
            {
                reader.AlignStream(AlignType.Align4);
            }

            if (IsReadBakedIndex(reader.Version))
            {
                BakedIndex = reader.ReadInt32();
            }
            if (IsReadBakingOutput(reader.Version))
            {
                BakingOutput.Read(reader);
            }
            Flare.Read(reader);
            RenderMode = (LightRenderMode)reader.ReadInt32();
            if (IsReadCullingMask(reader.Version))
            {
                CullingMask.Read(reader);
            }
            if (IsReadLightmapping(reader.Version))
            {
                Lightmapping = (LightmappingMode)reader.ReadInt32();
            }
            if (IsReadLightShadowCasterMode(reader.Version))
            {
                LightShadowCasterMode = (LightShadowCasterMode)reader.ReadInt32();
            }
            if (IsReadAreaSize(reader.Version))
            {
                AreaSize.Read(reader);
            }
            if (IsReadBounceIntensity(reader.Version))
            {
                BounceIntensity = reader.ReadSingle();
            }
            if (IsReadFalloffTable(reader.Version))
            {
                FalloffTable.Read(reader);
            }
            if (IsReadColorTemperature(reader.Version))
            {
                ColorTemperature    = reader.ReadSingle();
                UseColorTemperature = reader.ReadBoolean();
                reader.AlignStream(AlignType.Align4);
            }
        }
コード例 #3
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            ClearFlags = reader.ReadUInt32();
            BackGroundColor.Read(reader);
            if (HasProjectionMatrixMode(reader.Version))
            {
                ProjectionMatrixMode = (ProjectionMatrixMode)reader.ReadInt32();
            }
            if (HasGateFitMode(reader.Version))
            {
                if (HasGateFitModeFirst(reader.Version))
                {
                    GateFitMode = (GateFitMode)reader.ReadInt32();
                }
            }
#if UNIVERSAL
            if (HasFOVAxisMode(reader.Version, reader.Flags))
            {
                FOVAxisMode = (FieldOfViewAxis)reader.ReadInt32();
            }
#endif
            if (IsAlign1(reader.Version))
            {
                reader.AlignStream();
            }
            if (HasSensorSize(reader.Version))
            {
                SensorSize.Read(reader);
                LensShift.Read(reader);
            }
            if (HasGateFitMode(reader.Version))
            {
                if (!HasGateFitModeFirst(reader.Version))
                {
                    GateFitMode = (GateFitMode)reader.ReadInt32();
                }
            }
            if (HasFocalLength(reader.Version))
            {
                FocalLength = reader.ReadSingle();
            }

            NormalizedViewPortRect.Read(reader);
            NearClipPlane = reader.ReadSingle();
            FarClipPlane  = reader.ReadSingle();
            FieldOfView   = reader.ReadSingle();
            Orthographic  = reader.ReadBoolean();
            reader.AlignStream();

            OrthographicSize = reader.ReadSingle();
            Depth            = reader.ReadSingle();
            CullingMask.Read(reader);
            if (HasRenderingPath(reader.Version))
            {
                RenderingPath = (RenderingPath)reader.ReadInt32();
            }
            TargetTexture.Read(reader);
            if (HasTargetDisplay(reader.Version))
            {
                TargetDisplay = reader.ReadInt32();
            }
            if (HasTargetEye(reader.Version))
            {
                TargetEye = (StereoTargetEyeMask)reader.ReadInt32();
            }
            if (HasHDR(reader.Version))
            {
                HDR = reader.ReadBoolean();
            }
            if (HasAllowMSAA(reader.Version))
            {
                AllowMSAA = reader.ReadBoolean();
            }
            if (HasAllowDynamicResolution(reader.Version))
            {
                AllowDynamicResolution = reader.ReadBoolean();
            }
            if (HasForceIntoRT(reader.Version))
            {
                ForceIntoRT = reader.ReadBoolean();
            }
            if (HasOcclusionCulling(reader.Version))
            {
                OcclusionCulling = reader.ReadBoolean();
            }
            if (IsAlign2(reader.Version))
            {
                reader.AlignStream();
            }
            if (HasStereoConvergence(reader.Version))
            {
                StereoConvergence = reader.ReadSingle();
                StereoSeparation  = reader.ReadSingle();
            }
            if (HasStereoMirrorMode(reader.Version))
            {
                StereoMirrorMode = reader.ReadBoolean();
            }
        }
コード例 #4
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            Type = (LightType)reader.ReadInt32();
            if (HasShape(reader.Version))
            {
                Shape = (LightShape)reader.ReadInt32();
            }
            Color.Read(reader);
            if (HasAttenuate(reader.Version))
            {
                Attenuate = reader.ReadBoolean();
                if (IsAlign(reader.Version))
                {
                    reader.AlignStream();
                }
            }
            if (HasIntensity(reader.Version))
            {
                Intensity = reader.ReadSingle();
            }
            Range     = reader.ReadSingle();
            SpotAngle = reader.ReadSingle();
            if (HasInnerSpotAngle(reader.Version))
            {
                InnerSpotAngle = reader.ReadSingle();
            }
            if (HasCookieSize(reader.Version))
            {
                CookieSize = reader.ReadSingle();
            }
            if (HasShadows(reader.Version))
            {
                Shadows.Read(reader);
            }
            Cookie.Read(reader);
            DrawHalo = reader.ReadBoolean();
            if (HasActuallyLightmapped(reader.Version))
            {
                ActuallyLightmapped = reader.ReadBoolean();
            }
            if (IsAlign(reader.Version))
            {
                reader.AlignStream();
            }

            if (HasBakedIndex(reader.Version))
            {
                BakedIndex = reader.ReadInt32();
            }
            if (HasBakingOutput(reader.Version, reader.Flags))
            {
                BakingOutput.Read(reader);
            }
            Flare.Read(reader);
            RenderMode = (LightRenderMode)reader.ReadInt32();
            if (HasCullingMask(reader.Version))
            {
                CullingMask.Read(reader);
            }
            if (HasRenderingLayerMask(reader.Version))
            {
                RenderingLayerMask = reader.ReadInt32();
            }
            if (HasLightmapping(reader.Version))
            {
                Lightmapping = (LightmappingMode)reader.ReadInt32();
            }
            if (HasLightShadowCasterMode(reader.Version))
            {
                LightShadowCasterMode = (LightShadowCasterMode)reader.ReadInt32();
            }
            if (HasAreaSize(reader.Version))
            {
                AreaSize.Read(reader);
            }
            if (HasBounceIntensity(reader.Version))
            {
                BounceIntensity = reader.ReadSingle();
            }
            if (HasFalloffTable(reader.Version))
            {
                FalloffTable.Read(reader);
            }
            if (HasColorTemperature(reader.Version))
            {
                ColorTemperature = reader.ReadSingle();
            }
            if (HasUseColorTemperature(reader.Version))
            {
                UseColorTemperature = reader.ReadBoolean();
                reader.AlignStream();
            }
            if (HasBoundingSphereOverride(reader.Version))
            {
                BoundingSphereOverride.Read(reader);
                UseBoundingSphereOverride = reader.ReadBoolean();
                reader.AlignStream();
            }
#if UNIVERSAL
            if (HasShadowRadius(reader.Version, reader.Flags))
            {
                ShadowRadius = reader.ReadSingle();
                ShadowAngle  = reader.ReadSingle();
            }
#endif
        }
コード例 #5
0
        public override void Read(AssetStream stream)
        {
            base.Read(stream);

            Type = (LightType)stream.ReadInt32();
            Color.Read(stream);
            if (IsReadAttenuate(stream.Version))
            {
                Attenuate = stream.ReadBoolean();
                if (IsAlign(stream.Version))
                {
                    stream.AlignStream(AlignType.Align4);
                }
            }
            if (IsReadIntensity(stream.Version))
            {
                Intensity = stream.ReadSingle();
            }
            Range     = stream.ReadSingle();
            SpotAngle = stream.ReadSingle();
            if (IsReadCookieSize(stream.Version))
            {
                CookieSize = stream.ReadSingle();
            }
            if (IsReadShadows(stream.Version))
            {
                Shadows.Read(stream);
            }
            Cookie.Read(stream);
            DrawHalo = stream.ReadBoolean();
            if (IsReadActuallyLightmapped(stream.Version))
            {
                ActuallyLightmapped = stream.ReadBoolean();
            }
            if (IsAlign(stream.Version))
            {
                stream.AlignStream(AlignType.Align4);
            }

            if (IsReadBakedIndex(stream.Version))
            {
                BakedIndex = stream.ReadInt32();
            }
            if (IsReadBakingOutput(stream.Version))
            {
                BakingOutput.Read(stream);
            }
            Flare.Read(stream);
            RenderMode = (LightRenderMode)stream.ReadInt32();
            if (IsReadCullingMask(stream.Version))
            {
                CullingMask.Read(stream);
            }
            if (IsReadLightmapping(stream.Version))
            {
                Lightmapping = (LightmappingMode)stream.ReadInt32();
            }
            if (IsReadAreaSize(stream.Version))
            {
                AreaSize.Read(stream);
            }
            if (IsReadBounceIntensity(stream.Version))
            {
                BounceIntensity = stream.ReadSingle();
            }
            if (IsReadColorTemperature(stream.Version))
            {
                ColorTemperature    = stream.ReadSingle();
                UseColorTemperature = stream.ReadBoolean();
                stream.AlignStream(AlignType.Align4);
            }
        }
コード例 #6
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            Type = (ReflectionProbeType)reader.ReadInt32();
            Mode = (ReflectionProbeMode)reader.ReadInt32();
            if (IsReadRefreshMode(reader.Version))
            {
                RefreshMode     = (ReflectionProbeRefreshMode)reader.ReadInt32();
                TimeSlicingMode = (ReflectionProbeTimeSlicingMode)reader.ReadInt32();
            }
            Resolution      = reader.ReadInt32();
            UpdateFrequency = reader.ReadInt32();
            if (IsReadImportance(reader.Version))
            {
                if (IsReadImportanceFirst(reader.Version))
                {
                    Importance = reader.ReadInt16();
                }
            }
            BoxSize.Read(reader);
            BoxOffset.Read(reader);
            NearClip       = reader.ReadSingle();
            FarClip        = reader.ReadSingle();
            ShadowDistance = reader.ReadSingle();
            ClearFlags     = (ReflectionProbeClearFlags)reader.ReadUInt32();
            BackGroundColor.Read(reader);
            CullingMask.Read(reader);
            IntensityMultiplier = reader.ReadSingle();
            if (IsReadBlendDistance(reader.Version))
            {
                BlendDistance = reader.ReadSingle();
            }
            if (IsReadBakedRenderPassCount(reader.Version))
            {
                BakedRenderPassCount = reader.ReadUInt32();
                UseMipMap            = reader.ReadBoolean();
            }
            HDR = reader.ReadBoolean();
            if (IsReadBoxProjection(reader.Version))
            {
                BoxProjection        = reader.ReadBoolean();
                RenderDynamicObjects = reader.ReadBoolean();
                UseOcclusionCulling  = reader.ReadBoolean();
            }
            if (IsReadImportance(reader.Version))
            {
                if (!IsReadImportanceFirst(reader.Version))
                {
                    Importance = reader.ReadInt16();
                }
            }
            reader.AlignStream(AlignType.Align4);

            if (IsReadCustomBakedTexture(reader.Version))
            {
                CustomBakedTexture.Read(reader);
            }
            if (IsReadBakedTexture(reader.Version, reader.Flags))
            {
                BakedTextureTexture.Read(reader);
            }
        }