示例#1
0
        protected override void StartChecks(MaterialEditor materialEditor)
        {
            SetupMaterialWithBlendMode(Materials, (BlendMode)_blendMode.Property.floatValue);
            SetupMaterialWithColorMode(Materials, (ColorMode)_colorMode.Property.floatValue);
            SetMaterialKeywords(Materials);
            _zWriteOffOptions.IsVisible = Materials.All(x => x.GetInt("_ZWrite") == 0);

            if (_vertexMod.ToggleEnabled || _rim.ToggleEnabled)
            {
                _streamsControl.AddVertexStream(ParticleSystemVertexStream.Normal);
            }
            else
            {
                _streamsControl.RemoveVertexStream(ParticleSystemVertexStream.Normal);
            }

            _mainTileAndOffset.SetVisibility(!_flipbook.ToggleEnabled);

            if (_flipbook.ToggleEnabled)
            {
                _streamsControl.AddVertexStream(ParticleSystemVertexStream.UV2)
                .AddVertexStream(ParticleSystemVertexStream.AnimBlend)
                .AddVertexStream(ParticleSystemVertexStream.AnimFrame);
            }
            else
            {
                _streamsControl.RemoveVertexStream(ParticleSystemVertexStream.UV2)
                .RemoveVertexStream(ParticleSystemVertexStream.AnimBlend)
                .RemoveVertexStream(ParticleSystemVertexStream.AnimFrame);
            }

            _emissionControl.Property.textureScaleAndOffset = _albedoControl.Property.textureScaleAndOffset;
        }