void OnEnable() { EditorApplication.update += OnEditorUpdate; if (hitboxBackgroundStyle == null) { hitboxBackgroundStyle = new GUIStyle(); hitboxBackgroundStyle.normal.background = MakeTexture(1, 1, new Color(0f, 0f, 0f, 0.2f)); } //When changing scenes the background is deleted else if (hitboxBackgroundStyle.normal.background == null) { hitboxBackgroundStyle.normal.background = MakeTexture(1, 1, new Color(0f, 0f, 0f, 0.2f)); } targetComponents = new TargetComponents(target); zeroHitboxClipsFeeder = new ZeroHitBoxClipsFeeder(targetComponents.ZeroHitbox); zeroHitboxClipsFeeder.FeedAnimationClips(targetComponents.Animator); //TODO maybe get previously set value? keyframesIndex = 0; animationClipsIndex = 0; }
void OnEnable() { EditorApplication.update += OnEditorUpdate; if (hitboxBackgroundStyle == null) { hitboxBackgroundStyle = new GUIStyle(); hitboxBackgroundStyle.normal.background = MakeTexture(1, 1, new Color(0f, 0f, 0f, 0.2f)); } //When changing scenes the background is deleted else if (hitboxBackgroundStyle.normal.background == null) { hitboxBackgroundStyle.normal.background = MakeTexture(1, 1, new Color(0f, 0f, 0f, 0.2f)); } targetComponents = new TargetComponents(target); zeroHitboxClipsFeeder = new ZeroHitBoxClipsFeeder(targetComponents.ZeroHitbox); zeroHitboxClipsFeeder.FeedAnimationClips(targetComponents.Animator); //TODO maybe get previously set value? keyframesIndex = 0; animationClipsIndex = 0; }