- Home /
Unity inspector graph for exponential values
For my game I'd like to put my experience system on an exponential graph similar to games like Skyrim and Final Fantasy http://www.uesp.net/wiki/File:Skill_XP_per_Skill_Level_Skyrim.png In Unity there are several built in inspector tools that already perform this functionality for the Shuriken Particle System and Animator. Is it possible to use something like the built in Shuriken inspector graphs to build a simple graph like the one below for a single ability?
It looks like using AnimationCurve and calling AnimationCurve.Evaluate(xAxisVal) gets what I want. Not 100% sure if this is correct since the old animation system is technically deprecated.
yes you can use that animation curve, even though the old animation is not used they kept the curve feature... i used it in my RPG project, pretty helpful in representing character/enemy stats.
this is something you develop late in the game as you need to test various parts of the game to get it right. also read this http://gamedev.stackexchange.com/questions/14309/how-to-develop-rpg-damage-formulas
helped me develop some formula for combat too.
Answer by RafaMiranda · Nov 14, 2018 at 02:47 AM
Question is old but, just in case someone else gets here, the answer is yes: check for AnimationCurve. The code bellow should get you started on editing and using the curve values. Ideally, derive your class from ScriptableObject instead of Monobehaviour, if you know how to handle scriptable objects.
using UnityEngine;
public class ExperienceCurves : Monobehaviour
{
AnimationCurve standard;
AnimationCurve alchemy;
// and so on...
}