Beispiel #1
0
        ///<summary>
        ///It returns you a KAPProfile of the given name through searching for its file
        ///</summary>
        ///<param name='name'>The name of the KAPProfile you want to get</param>
        public static KAPProfile fromFile(string name)
        {
            string     json   = File.ReadAllText(Application.dataPath + "/KAPAvatars/" + name + "/" + name + ".KAPprofile");
            KAPProfile result = JsonUtility.FromJson <KAPProfile>(json);

            result.perfP = PerformanceProfile.fromFile(Application.dataPath + "/KAPAvatars/" + name + "/");
            return(result);
        }
Beispiel #2
0
 public PerformanceProfile(KAPProfile kp)
 {
     polysperf            = rate(kp.polys, 32000, 70000, 70000, 70000);
     boneamountperf       = rate(kp.boneamount, 75, 150, 256, 400);
     dynboneamountperf    = rate(kp.dynboneamount, 0, 16, 32, 256);
     dynbonecollidersperf = rate(kp.dynbonecolliders, 0, 0, 4, 32);
     meshrenderersperf    = rate(kp.meshrenderers, 4, 8, 16, 32);
     particle_systemsperf = rate(kp.particle_systems, 0, 4, 8, 16);
     clothperf            = rate(kp.cloth, 0, 1, 1, 1);
     animatorsperf        = rate(kp.animators, 1, 4, 16, 32);
     lightsperf           = rate(kp.lights, 0, 0, 0, 1);
     audio_sourcesperf    = rate(kp.audio_sources, 1, 4, 8, 8);
 }