public override void ReadFrom(object obj)
        {
            base.ReadFrom(obj);
            if (obj == null)
            {
                return;
            }

            ParticleSystem.CustomDataModule o = (ParticleSystem.CustomDataModule)obj;
            m_mode1  = o.GetMode(ParticleSystemCustomData.Custom1);
            m_mode2  = o.GetMode(ParticleSystemCustomData.Custom2);
            m_color1 = o.GetColor(ParticleSystemCustomData.Custom1);
            m_color2 = o.GetColor(ParticleSystemCustomData.Custom2);
            m_vectorComponentCount1 = o.GetVectorComponentCount(ParticleSystemCustomData.Custom1);
            m_vectorComponentCount2 = o.GetVectorComponentCount(ParticleSystemCustomData.Custom2);

            if (m_vectorComponentCount1 > 0)
            {
                m_vectors1 = new ParticleSystem.MinMaxCurve[m_vectorComponentCount1];
                for (int i = 0; i < m_vectors1.Length; ++i)
                {
                    m_vectors1[i] = o.GetVector(ParticleSystemCustomData.Custom1, i);
                }
            }

            if (m_vectorComponentCount2 > 0)
            {
                m_vectors2 = new ParticleSystem.MinMaxCurve[m_vectorComponentCount2];
                for (int i = 0; i < m_vectors2.Length; ++i)
                {
                    m_vectors2[i] = o.GetVector(ParticleSystemCustomData.Custom2, i);
                }
            }
        }
Esempio n. 2
0
 extern public void SetMode(ParticleSystemCustomData stream, ParticleSystemCustomDataMode mode);