예제 #1
0
        public void Reset()
        {
            colorMode      = Consts.ColorModeDefault;
            color          = Consts.FlatColor;
            colorFromLight = true;

            intensityFromLight    = true;
            intensityModeAdvanced = false;
            intensityInside       = Consts.IntensityDefault;
            intensityOutside      = Consts.IntensityDefault;

            blendingMode   = Consts.BlendingModeDefault;
            shaderAccuracy = Consts.ShaderAccuracyDefault;

            spotAngleFromLight = true;
            spotAngle          = Consts.SpotAngleDefault;

            coneRadiusStart    = Consts.ConeRadiusStart;
            geomMeshType       = Consts.GeomMeshType;
            geomCustomSides    = Consts.GeomSidesDefault;
            geomCustomSegments = Consts.GeomSegmentsDefault;
            geomCap            = Consts.GeomCap;

            attenuationEquation       = Consts.AttenuationEquationDefault;
            attenuationCustomBlending = Consts.AttenuationCustomBlending;

            fallOffEndFromLight = true;
            fallOffStart        = Consts.FallOffStart;
            fallOffEnd          = Consts.FallOffEnd;

            depthBlendDistance     = Consts.DepthBlendDistance;
            cameraClippingDistance = Consts.CameraClippingDistance;

            glareFrontal = Consts.GlareFrontal;
            glareBehind  = Consts.GlareBehind;

            fresnelPow = Consts.FresnelPow;

            noiseMode              = Consts.NoiseModeDefault;
            noiseIntensity         = Consts.NoiseIntensityDefault;
            noiseScaleUseGlobal    = true;
            noiseScaleLocal        = Consts.NoiseScaleDefault;
            noiseVelocityUseGlobal = true;
            noiseVelocityLocal     = Consts.NoiseVelocityDefault;

            sortingLayerID = 0;
            sortingOrder   = 0;

            fadeOutBegin = Consts.FadeOutBeginDefault;
            fadeOutEnd   = Consts.FadeOutEndDefault;

            dimensions = Consts.DimensionsDefault;
            tiltFactor = Consts.TiltDefault;
            skewingLocalForwardDirection = Consts.SkewingLocalForwardDirectionDefault;
            clippingPlaneTransform       = Consts.ClippingPlaneTransformDefault;

            trackChangesDuringPlaytime = false;

            m_EditorDirtyFlags = EditorDirtyFlags.Everything;
        }
예제 #2
0
        void HandleBackwardCompatibility(int serializedVersion, int newVersion)
        {
            if (serializedVersion == -1)
            {
                return;                                     // freshly new spawned entity: nothing to do
            }
            if (serializedVersion == newVersion)
            {
                return;                                     // same version: nothing to do
            }
            if (serializedVersion < 1301)
            {
                // quadratic attenuation is a new feature of 1.3
                attenuationEquation = AttenuationEquation.Linear;
            }

            if (serializedVersion < 1501)
            {
                // custom mesh is a new feature of 1.5
                geomMeshType       = MeshType.Custom;
                geomCustomSegments = 5;
            }

            if (serializedVersion < 1610)
            {
                // intensity global/advanced mode is a feature of 1.61
                intensityFromLight    = false;
                intensityModeAdvanced = !Mathf.Approximately(intensityInside, intensityOutside);
            }

            Utils.MarkCurrentSceneDirty();
        }
예제 #3
0
        void HandleBackwardCompatibility(int serializedVersion, int newVersion)
        {
            if (serializedVersion == -1)
            {
                return;                                     // freshly new spawned entity: nothing to do
            }
            if (serializedVersion == newVersion)
            {
                return;                                     // same version: nothing to do
            }
            if (serializedVersion < 1301)
            {
                // quadratic attenuation is a new feature of 1.3
                attenuationEquation = AttenuationEquation.Linear;
            }

            if (serializedVersion < 1501)
            {
                // custom mesh is a new feature of 1.5
                geomMeshType       = MeshType.Custom;
                geomCustomSegments = 5;
            }

            Utils.MarkCurrentSceneDirty();
        }
예제 #4
0
 void HandleBackwardCompatibility(int serializedVersion, int newVersion)
 {
     if (serializedVersion == -1)
     {
         return;                                     // freshly new spawned entity: nothing to do
     }
     if (serializedVersion == newVersion)
     {
         return;                                     // same version: nothing to do
     }
     if (serializedVersion < 1301)
     {
         attenuationEquation = AttenuationEquation.Linear;                           // quadratic attenuation is a new feature of 1.3
     }
 }
예제 #5
0
        public void Reset()
        {
            colorMode      = Consts.ColorModeDefault;
            color          = Consts.FlatColor;
            colorFromLight = true;

            alphaInside  = Consts.Alpha;
            alphaOutside = Consts.Alpha;
            blendingMode = Consts.BlendingModeDefault;

            spotAngleFromLight = true;
            spotAngle          = Consts.SpotAngleDefault;

            coneRadiusStart    = Consts.ConeRadiusStart;
            geomMeshType       = Consts.GeomMeshType;
            geomCustomSides    = Consts.GeomSidesDefault;
            geomCustomSegments = Consts.GeomSegmentsDefault;
            geomCap            = Consts.GeomCap;

            attenuationEquation       = Consts.AttenuationEquationDefault;
            attenuationCustomBlending = Consts.AttenuationCustomBlending;

            fadeEndFromLight = true;
            fadeStart        = Consts.FadeStart;
            fadeEnd          = Consts.FadeEnd;

            depthBlendDistance     = Consts.DepthBlendDistance;
            cameraClippingDistance = Consts.CameraClippingDistance;

            glareFrontal = Consts.GlareFrontal;
            glareBehind  = Consts.GlareBehind;

            fresnelPow = Consts.FresnelPow;

            noiseEnabled           = false;
            noiseIntensity         = Consts.NoiseIntensityDefault;
            noiseScaleUseGlobal    = true;
            noiseScaleLocal        = Consts.NoiseScaleDefault;
            noiseVelocityUseGlobal = true;
            noiseVelocityLocal     = Consts.NoiseVelocityDefault;

            sortingLayerID = 0;
            sortingOrder   = 0;

            trackChangesDuringPlaytime = false;

            m_EditorDirtyFlags = EditorDirtyFlags.Everything;
        }
 private void HandleBackwardCompatibility(int serializedVersion, int newVersion)
 {
     if (serializedVersion == -1 || serializedVersion == newVersion)
     {
         return;
     }
     if (serializedVersion < 1301)
     {
         this.attenuationEquation = AttenuationEquation.Linear;
     }
     if (serializedVersion < 1501)
     {
         this.geomMeshType       = MeshType.Custom;
         this.geomCustomSegments = 5;
     }
     Utils.MarkCurrentSceneDirty();
 }