TSMagic.Start C# (CSharp) Method

Start() private method

private Start ( ) : void
return void
    private void Start()
    {
        m_hornMagic.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;

        GameObject particles = Instantiate(m_particlePrefab, m_hornMagic.transform, false) as GameObject;
        ParticleSystem particleSystem = particles.GetComponent<ParticleSystem>();
        ParticleSystem.ShapeModule shape = particleSystem.shape;
        shape.meshRenderer = m_hornMagic;
        m_hornEmission = particleSystem.emission;

        float scale = m_hornMagic.bounds.extents.magnitude;
        m_baseEmissionRate = m_hornEmission.rate.constant * scale;
        m_hornMagic.material.SetFloat("_Displacement", m_hornMagic.material.GetFloat("_Displacement") * scale);
        m_hornMagic.material.SetFloat("_Amplitude", m_hornMagic.material.GetFloat("_Amplitude") * scale);
        m_hornMagic.material.SetFloat("_SpatialFrequency", m_hornMagic.material.GetFloat("_SpatialFrequency") / scale);

        m_hornMagicColor = m_magicColor;
        m_hornMagicColor.a = 0;
        m_emissionFraction = 0;
    }