Ejemplo n.º 1
0
 protected void OnDisable()
 {
     this.character = null;
 }
Ejemplo n.º 2
0
        // INITIALIZER: -----------------------------------------------------------------------------------------------

        protected void OnEnable()
        {
            this.character = (SyntyCharacter)target;

            string    iconProperties1Path = Path.Combine(CHARACTER_ICONS_PATH, "CharacterAnimModel.png");
            Texture2D iconProperties1     = AssetDatabase.LoadAssetAtPath <Texture2D>(iconProperties1Path);

            this.sectionProperties1 = new Section(SECTION_CHAR_PARAMS1, iconProperties1, this.Repaint);

            string    iconProperties2Path = Path.Combine(CHARACTER_ICONS_PATH, "CharacterAnimRagdoll.png");
            Texture2D iconProperties2     = AssetDatabase.LoadAssetAtPath <Texture2D>(iconProperties2Path);

            this.sectionProperties2 = new Section(SECTION_CHAR_PARAMS2, iconProperties2, this.Repaint);

            string    iconProperties3Path = Path.Combine(CHARACTER_ICONS_PATH, "CharacterBasicParameters.png");
            Texture2D iconProperties3     = AssetDatabase.LoadAssetAtPath <Texture2D>(iconProperties3Path);

            this.sectionProperties3 = new Section(SECTION_CHAR_PARAMS3, iconProperties3, this.Repaint);

            this.spGender = serializedObject.FindProperty(PROP_GENDER);

            this.spHeadAllIndex       = serializedObject.FindProperty(PROP_HEAD_INDEX);
            this.spHeadNoIndex        = serializedObject.FindProperty(PROP_HEAD_NO_INDEX);
            this.spEyebrowIndex       = serializedObject.FindProperty(PROP_EYEBROW_INDEX);
            this.spFacialHairIndex    = serializedObject.FindProperty(PROP_FACIAL_HAIR_INDEX);
            this.spTorsoIndex         = serializedObject.FindProperty(PROP_TORSO_INDEX);
            this.spArmUpperRightIndex = serializedObject.FindProperty(PROP_ARM_UPPER_RIGHT_INDEX);
            this.spArmUpperLeftIndex  = serializedObject.FindProperty(PROP_ARM_UPPER_LEFT_INDEX);
            this.spArmLowerRightIndex = serializedObject.FindProperty(PROP_ARM_LOWER_RIGHT_INDEX);
            this.spArmLowerLeftIndex  = serializedObject.FindProperty(PROP_ARM_LOWER_LEFT_INDEX);
            this.spHandRightIndex     = serializedObject.FindProperty(PROP_HAND_RIGHT_INDEX);
            this.spHandLeftIndex      = serializedObject.FindProperty(PROP_HAND_LEFT_INDEX);
            this.spHipsIndex          = serializedObject.FindProperty(PROP_HIPS_INDEX);
            this.spLegRightIndex      = serializedObject.FindProperty(PROP_LEG_RIGHT_INDEX);
            this.spLegLeftIndex       = serializedObject.FindProperty(PROP_LEG_LEFT_INDEX);

            this.spSave = serializedObject.FindProperty(PROP_SAVEOB);

            this.spMaleHeadAllElements   = serializedObject.FindProperty(PROP_MALEHEAD_ALL_ELEMENTS);
            this.spMaleHeadNoElements    = serializedObject.FindProperty(PROP_MALEHEAD_NO_ELEMENTS);
            this.spMaleEyebrows          = serializedObject.FindProperty(PROP_MALEEYEBROWS);
            this.spMaleFacialHair        = serializedObject.FindProperty(PROP_MALEFACIALHAIR);
            this.spMaleTorso             = serializedObject.FindProperty(PROP_MALETORSO);
            this.spMaleArmUpperRight     = serializedObject.FindProperty(PROP_MALEARMUPPERRIGHT);
            this.spMaleArmUpperLeft      = serializedObject.FindProperty(PROP_MALEARMUPPERLEFT);
            this.spMaleArmLowerRight     = serializedObject.FindProperty(PROP_MALEARMLOWERRIGHT);
            this.spMaleArmLowerLeft      = serializedObject.FindProperty(PROP_MALEARMLOWERLEFT);
            this.spMaleHandRight         = serializedObject.FindProperty(PROP_MALEHANDRIGHT);
            this.spMaleHandLeft          = serializedObject.FindProperty(PROP_MALEHANDLEFT);
            this.spMaleHips              = serializedObject.FindProperty(PROP_MALEHIPS);
            this.spMaleLegRight          = serializedObject.FindProperty(PROP_MALELEGRIGHT);
            this.spMaleLegLeft           = serializedObject.FindProperty(PROP_MALELEGLEFT);
            this.spFemaleHeadAllElements = serializedObject.FindProperty(PROP_FEMALEHEAD_ALL_ELEMENTS);
            this.spFemaleHeadNoElements  = serializedObject.FindProperty(PROP_FEMALEHEAD_NO_ELEMENTS);
            this.spFemaleEyebrows        = serializedObject.FindProperty(PROP_FEMALEEYEBROWS);
            this.spFemaleFacialHair      = serializedObject.FindProperty(PROP_FEMALEFACIALHAIR);
            this.spFemaleTorso           = serializedObject.FindProperty(PROP_FEMALETORSO);
            this.spFemaleArmUpperRight   = serializedObject.FindProperty(PROP_FEMALEARMUPPERRIGHT);
            this.spFemaleArmUpperLeft    = serializedObject.FindProperty(PROP_FEMALEARMUPPERLEFT);
            this.spFemaleArmLowerRight   = serializedObject.FindProperty(PROP_FEMALEARMLOWERRIGHT);
            this.spFemaleArmLowerLeft    = serializedObject.FindProperty(PROP_FEMALEARMLOWERLEFT);
            this.spFemaleHandRight       = serializedObject.FindProperty(PROP_FEMALEHANDRIGHT);
            this.spFemaleHandLeft        = serializedObject.FindProperty(PROP_FEMALEHANDLEFT);
            this.spFemaleHips            = serializedObject.FindProperty(PROP_FEMALEHIPS);
            this.spFemaleLegRight        = serializedObject.FindProperty(PROP_FEMALELEGRIGHT);
            this.spFemaleLegLeft         = serializedObject.FindProperty(PROP_FEMALELEGLEFT);

            this.spHeadCoveringsBaseHairIndex     = serializedObject.FindProperty(PROP_HEADCOVERINGSBASEHAIRINDEX);
            this.spHeadCoveringsNoFacialHairIndex = serializedObject.FindProperty(PROP_HEADCOVERINGSNOFACIALHAIRINDEX);
            this.spHeadCoveringsNoHairIndex       = serializedObject.FindProperty(PROP_HEADCOVERINGSNOHAIRINDEX);
            this.spHairIndex                    = serializedObject.FindProperty(PROP_HAIRINDEX);
            this.spHelmetIndex                  = serializedObject.FindProperty(PROP_HELMETINDEX);
            this.spBackAttackmentIndex          = serializedObject.FindProperty(PROP_BACKATTACKMENTINDEX);
            this.spShoulderAttachmentRightIndex = serializedObject.FindProperty(PROP_SHOULDERATTACHMENTRIGHTINDEX);
            this.spShoudlerAttachmentLeftIndex  = serializedObject.FindProperty(PROP_SHOUDLERATTACHMENTLEFTINDEX);
            this.spElbowAttachmendRightIndex    = serializedObject.FindProperty(PROP_ELBOWATTACHMENDRIGHTINDEX);
            this.spElbowAttachmentLeftIndex     = serializedObject.FindProperty(PROP_ELBOWATTACHMENTLEFTINDEX);
            this.spHipsAttachmentIndex          = serializedObject.FindProperty(PROP_HIPSATTACHMENTINDEX);
            this.spKneeAttachmentRightIndex     = serializedObject.FindProperty(PROP_KNEEATTACHMENTRIGHTINDEX);
            this.spKneeAttachmentLeftIndex      = serializedObject.FindProperty(PROP_KNEEATTACHMENTLEFTINDEX);
            this.spElfEarIndex                  = serializedObject.FindProperty(PROP_ELF_EAR_INDEX);

            this.spHeadCoveringsBaseHair     = serializedObject.FindProperty(PROP_HEADCOVERINGSBASEHAIR);
            this.spHeadCoveringsNoFacialHair = serializedObject.FindProperty(PROP_HEADCOVERINGSNOFACIALHAIR);
            this.spHeadCoveringsNoHair       = serializedObject.FindProperty(PROP_HEADCOVERINGSNOHAIR);
            this.spHair                    = serializedObject.FindProperty(PROP_HAIR);
            this.spHelmet                  = serializedObject.FindProperty(PROP_HELMET);
            this.spBackAttackment          = serializedObject.FindProperty(PROP_BACKATTACKMENT);
            this.spShoulderAttachmentRight = serializedObject.FindProperty(PROP_SHOULDERATTACHMENTRIGHT);
            this.spShoulderAttachmentLeft  = serializedObject.FindProperty(PROP_SHOULDERATTACHMENTLEFT);
            this.spElbowAttachmendRight    = serializedObject.FindProperty(PROP_ELBOWATTACHMENDRIGHT);
            this.spElbowAttachmentLeft     = serializedObject.FindProperty(PROP_ELBOWATTACHMENTLEFT);
            this.spHipsAttachment          = serializedObject.FindProperty(PROP_HIPSATTACHMENT);
            this.spKneeAttachmentRight     = serializedObject.FindProperty(PROP_KNEEATTACHMENTRIGHT);
            this.spKneeAttachmentLeft      = serializedObject.FindProperty(PROP_KNEEATTACHMENTLEFT);
            this.spElfEar                  = serializedObject.FindProperty(PROP_ELF_EAR);

            this.spPrimaryColor          = serializedObject.FindProperty(PROP_PRIMARYCOLOR);
            this.spSecondaryColor        = serializedObject.FindProperty(PROP_SECONDARYCOLOR);
            this.spLeatherPrimaryColor   = serializedObject.FindProperty(PROP_LEATHERPRIMARYCOLOR);
            this.spLeatherSecondaryColor = serializedObject.FindProperty(PROP_LEATHERSECONDARYCOLOR);
            this.spMetalPrimaryColor     = serializedObject.FindProperty(PROP_METALPRIMARYCOLOR);
            this.spMetalSecondaryColor   = serializedObject.FindProperty(PROP_METALSECONDARYCOLOR);
            this.spMetalDarkColor        = serializedObject.FindProperty(PROP_METALDARKCOLOR);
            this.spHairColor             = serializedObject.FindProperty(PROP_HAIRCOLOR);
            this.spSkinColor             = serializedObject.FindProperty(PROP_SKINCOLOR);
            this.spStubbleColor          = serializedObject.FindProperty(PROP_STUBBLECOLOR);
            this.spScarColor             = serializedObject.FindProperty(PROP_SCARCOLOR);
            this.spBodyArtColor          = serializedObject.FindProperty(PROP_BODYARTCOLOR);
            this.spEyeColor = serializedObject.FindProperty(PROP_EYECOLOR);

            this.spSave = serializedObject.FindProperty(PROP_SAVEOB);
        }