public void OnLoad(object generic) { Debug.Log("OnLoad Fired"); SyntyCharacterData container = generic as SyntyCharacterData; if (container == null) { return; } Debug.Log("Have container"); LoadCharacterTransforms(); gender = container.gender; headAllElementsIndex = container.headAllElementsIndex; headNoElementsIndex = container.headNoElementsIndex; eyebrowIndex = container.eyebrowIndex; facialHairIndex = container.facialHairIndex; torsoIndex = container.torsoIndex; armUpperRightIndex = container.armUpperRightIndex; armUpperLeftIndex = container.armUpperLeftIndex; armLowerRightIndex = container.armLowerRightIndex; armLowerLeftIndex = container.armLowerLeftIndex; handRightIndex = container.handRightIndex; handLeftIndex = container.handLeftIndex; hipsIndex = container.hipsIndex; legRightIndex = container.legRightIndex; legLeftIndex = container.legLeftIndex; headCoveringsBaseHairIndex = container.headCoveringsBaseHairIndex; headCoveringsNoFacialHairIndex = container.headCoveringsNoFacialHairIndex; headCoveringsNoHairIndex = container.headCoveringsNoHairIndex; hairIndex = container.hairIndex; helmetIndex = container.helmetIndex; backAttackmentIndex = container.backAttackmentIndex; shoulderAttachmentRightIndex = container.shoulderAttachmentRightIndex; shoudlerAttachmentLeftIndex = container.shoudlerAttachmentLeftIndex; elbowAttachmendRightIndex = container.elbowAttachmendRightIndex; elbowAttachmentLeftIndex = container.elbowAttachmentLeftIndex; hipsAttachmentIndex = container.hipsAttachmentIndex; kneeAttachmentRightIndex = container.kneeAttachmentRightIndex; kneeAttachmentLeftIndex = container.kneeAttachmentLeftIndex; elfEarIndex = container.elfEarIndex; primaryColor = container.primaryColor; secondaryColor = container.secondaryColor; leatherPrimaryColor = container.leatherPrimaryColor; leatherSecondaryColor = container.leatherSecondaryColor; metalPrimaryColor = container.metalPrimaryColor; metalSecondaryColor = container.metalSecondaryColor; metalDarkColor = container.metalDarkColor; hairColor = container.hairColor; skinColor = container.skinColor; stubbleColor = container.stubbleColor; scarColor = container.scarColor; bodyArtColor = container.bodyArtColor; eyeColor = container.eyeColor; UpdateCharacterVisuals(); }
// INITIALIZERS: -------------------------------------------------------------------------- #region Initializers protected override void Awake() { base.Awake(); if (!Application.isPlaying) { return; } LoadCharacterTransforms(); this.initSyntyCharacterData = new SyntyCharacterData() { gender = EnumGender.Male, headAllElementsIndex = 0, headNoElementsIndex = 0, eyebrowIndex = 0, torsoIndex = 0, facialHairIndex = 0, armUpperRightIndex = 0, armUpperLeftIndex = 0, armLowerRightIndex = 0, armLowerLeftIndex = 0, handRightIndex = 0, handLeftIndex = 0, hipsIndex = 0, legRightIndex = 0, legLeftIndex = 0, headCoveringsBaseHairIndex = 0, headCoveringsNoFacialHairIndex = 0, headCoveringsNoHairIndex = 0, hairIndex = 0, helmetIndex = 0, backAttackmentIndex = 0, shoulderAttachmentRightIndex = 0, shoudlerAttachmentLeftIndex = 0, elbowAttachmendRightIndex = 0, elbowAttachmentLeftIndex = 0, hipsAttachmentIndex = 0, kneeAttachmentRightIndex = 0, kneeAttachmentLeftIndex = 0, elfEarIndex = 0, primaryColor = this.primaryColor, secondaryColor = this.secondaryColor, leatherPrimaryColor = this.leatherPrimaryColor, leatherSecondaryColor = this.leatherSecondaryColor, metalPrimaryColor = this.metalPrimaryColor, metalSecondaryColor = this.metalSecondaryColor, metalDarkColor = this.metalDarkColor, hairColor = this.hairColor, skinColor = this.skinColor, stubbleColor = this.stubbleColor, scarColor = this.scarColor, bodyArtColor = this.bodyArtColor, eyeColor = this.eyeColor, }; if (this.save) { SaveLoadManager.Instance.Initialize(this); } }