Example #1
0
    private void ShowEffectPerformanceHeadInfo()
    {
        EffectPerformanceCollection component = null;
        GameObject effectPerformanceObj       = GameObject.Find(mEffectPerformanceObjName);

        if (null != effectPerformanceObj)
        {
            component = effectPerformanceObj.GetComponent <EffectPerformanceCollection>();
        }

        GUILayout.BeginHorizontal();

        if (GUILayout.Button("Effect File\nName", GUILayout.Width(300)))
        {
        }
        if (GUILayout.Button("Effect Path\nName", GUILayout.Width(400)))
        {
        }
        if (GUILayout.Button("Average Particle\nNumber", GUILayout.Width(120)) && null != component)
        {
            component.mEffectPerformanceDataList.Sort(EffectPerformanceCollection.EffectPerformanceData.SortByAverageParticleNum);
        }
        if (GUILayout.Button("Average Particle\nSize", GUILayout.Width(120)) && null != component)
        {
            component.mEffectPerformanceDataList.Sort(EffectPerformanceCollection.EffectPerformanceData.SortByAverageParticleSize);
        }
        if (GUILayout.Button("Average\nFPS", GUILayout.Width(120)) && null != component)
        {
            component.mEffectPerformanceDataList.Sort(EffectPerformanceCollection.EffectPerformanceData.SortByAverageFPS);
        }

        GUILayout.EndHorizontal();
    }
Example #2
0
    public void CollectEffectPerformanceData()
    {
        GameObject effectPerformanceObj;

        if (null != GameObject.Find(mEffectPerformanceObjName))
        {
            effectPerformanceObj = GameObject.Find(mEffectPerformanceObjName);
        }
        else
        {
            effectPerformanceObj = new GameObject(mEffectPerformanceObjName);
        }

        EffectPerformanceCollection component = effectPerformanceObj.GetComponent <EffectPerformanceCollection>();

        if (null == component)
        {
            component = effectPerformanceObj.AddComponent <EffectPerformanceCollection>();
        }

        if ("" != mEffectPath)
        {
            mEffectPathNameList.Clear();
            DirectoryInfo dir = new DirectoryInfo(mEffectPath);
            GetFiles(dir);

            component.mEffectPathNameArray = null;
            component.mEffectPathNameArray = new string[mEffectPathNameList.Count];
            component.mEffectPathNameArray = mEffectPathNameList.ToArray();
        }
    }
Example #3
0
    private void ShowEffectPerformanceList()
    {
        GameObject effectPerformanceObj = GameObject.Find(mEffectPerformanceObjName);

        if (null != effectPerformanceObj)
        {
            EffectPerformanceCollection component = effectPerformanceObj.GetComponent <EffectPerformanceCollection>();
            if (null != component && component.GetFinish())
            {
                foreach (EffectPerformanceCollection.EffectPerformanceData data in component.mEffectPerformanceDataList)
                {
                    DrawRow(data);
                }
            }
        }
    }
Example #4
0
    private void ShowEffectPerformanceList()
    {
        GameObject effectPerformanceObj = GameObject.Find(mEffectPerformanceObjName);

        if (null != effectPerformanceObj)
        {
            EffectPerformanceCollection component = effectPerformanceObj.GetComponent <EffectPerformanceCollection>();
            if (null != component && component.GetFinish())
            {
                {
                    var __list3      = component.mEffectPerformanceDataList;
                    var __listCount3 = __list3.Count;
                    for (int __i3 = 0; __i3 < __listCount3; ++__i3)
                    {
                        var data = (EffectPerformanceCollection.EffectPerformanceData)__list3[__i3];
                        {
                            DrawRow(data);
                        }
                    }
                }
            }
        }
    }