// INITIALIZERS: -------------------------------------------------------------------------- protected void OnEnable() { this.characterAnimator = (CharacterAnimator)this.target; string iconModelPath = Path.Combine(CharacterEditor.CHARACTER_ICONS_PATH, "CharacterAnimModel.png"); Texture2D iconModel = AssetDatabase.LoadAssetAtPath <Texture2D>(iconModelPath); this.sectionModel = new CharacterEditor.Section("Character Model", iconModel, this.Repaint); string iconIKPath = Path.Combine(CharacterEditor.CHARACTER_ICONS_PATH, "CharacterAnimIK.png"); Texture2D iconIK = AssetDatabase.LoadAssetAtPath <Texture2D>(iconIKPath); this.sectionIK = new CharacterEditor.Section("Inverse Kinematics", iconIK, this.Repaint); string iconRagdollPath = Path.Combine(CharacterEditor.CHARACTER_ICONS_PATH, "CharacterAnimRagdoll.png"); Texture2D iconRagdoll = AssetDatabase.LoadAssetAtPath <Texture2D>(iconRagdollPath); this.sectionRagdoll = new CharacterEditor.Section("Ragdoll", iconRagdoll, this.Repaint); this.spAnimator = serializedObject.FindProperty("animator"); this.spDefaultState = serializedObject.FindProperty("defaultState"); this.spUseFootIK = serializedObject.FindProperty("useFootIK"); this.spUseHandIK = serializedObject.FindProperty("useHandIK"); this.spUseSmartHeadIK = serializedObject.FindProperty("useSmartHeadIK"); this.spRagdollMass = serializedObject.FindProperty("ragdollMass"); this.spStableTimeout = serializedObject.FindProperty("stableTimeout"); this.spStandFaceUp = serializedObject.FindProperty("standFaceUp"); this.spStandFaceDown = serializedObject.FindProperty("standFaceDown"); }
// INITIALIZERS: -------------------------------------------------------------------------- protected void OnEnable() { this.characterAnimator = (CharacterAnimator)this.target; string iconAnimatorPath = Path.Combine(CharacterEditor.CHARACTER_ICONS_PATH, "CharacterAnimParams.png"); Texture2D iconAnimator = AssetDatabase.LoadAssetAtPath <Texture2D>(iconAnimatorPath); this.sectionAnimator = new CharacterEditor.Section("Animator Parameters", iconAnimator, this.Repaint); string iconModelPath = Path.Combine(CharacterEditor.CHARACTER_ICONS_PATH, "CharacterAnimModel.png"); Texture2D iconModel = AssetDatabase.LoadAssetAtPath <Texture2D>(iconModelPath); this.sectionModel = new CharacterEditor.Section("Character Model", iconModel, this.Repaint); string iconIKPath = Path.Combine(CharacterEditor.CHARACTER_ICONS_PATH, "CharacterAnimIK.png"); Texture2D iconIK = AssetDatabase.LoadAssetAtPath <Texture2D>(iconIKPath); this.sectionIK = new CharacterEditor.Section("Inverse Kinematics", iconIK, this.Repaint); this.spMoveForwardSpeed = serializedObject.FindProperty("moveForwardSpeed"); this.spMoveSidesSpeed = serializedObject.FindProperty("moveSidesSpeed"); this.spMovementSpeed = serializedObject.FindProperty("movementSpeed"); this.spTargetLock = serializedObject.FindProperty("targetLock"); this.spVerticalSpeed = serializedObject.FindProperty("verticalSpeed"); this.spIsGrounded = serializedObject.FindProperty("isGrounded"); this.spJump = serializedObject.FindProperty("jump"); this.spFallForce = serializedObject.FindProperty("fallForce"); this.spNormalX = serializedObject.FindProperty("normalX"); this.spNormalY = serializedObject.FindProperty("normalY"); this.spNormalZ = serializedObject.FindProperty("normalZ"); this.spAnimator = serializedObject.FindProperty("animator"); this.spUseFootIK = serializedObject.FindProperty("useFootIK"); this.spUseHandIK = serializedObject.FindProperty("useHandIK"); this.spUseSmartHeadIK = serializedObject.FindProperty("useSmartHeadIK"); }