Insanely huge initial commit

This commit is contained in:
2026-02-21 16:40:15 -08:00
parent 208d626100
commit f74c547a13
33825 changed files with 5213498 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fb2b64528cd303b42bd75c69e09180a7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using UnityEngine;
using UnityEditor;
namespace Febucci.UI.Examples.Editors
{
[CustomEditor(typeof(EffectsTesting))]
class EffectsTestingCustomEditor : Editor
{
public override void OnInspectorGUI()
{
if (Application.isPlaying)
{
ButtonSetText();
GUILayout.Space(10);
base.OnInspectorGUI();
GUILayout.Space(10);
ButtonSetText();
}
else
{
base.OnInspectorGUI();
}
}
void ButtonSetText()
{
if (GUILayout.Button("Set Text again"))
{
((EffectsTesting)target)?.ShowText();
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8e22169ad09002c4ebe53152227f6dfc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,17 @@
{
"name": "Febucci.TextAnimator.Demo.Editor",
"references": [
"Febucci.TextAnimator.Demo.Runtime",
"Febucci.TextAnimator.Runtime"
],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a8c8b376e94bb1f48b0f97055a9b21fe
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using UnityEngine;
using UnityEditor;
namespace Febucci.UI.Examples.Editors
{
[CustomEditor(typeof(UsageExample))]
class UsageExampleCustomEditor : Editor
{
public override void OnInspectorGUI()
{
if (Application.isPlaying)
{
ButtonSetText();
GUILayout.Space(10);
base.OnInspectorGUI();
GUILayout.Space(10);
ButtonSetText();
}
else
{
base.OnInspectorGUI();
}
}
void ButtonSetText()
{
if (GUILayout.Button("Set Text again"))
{
((UsageExample)target)?.ShowText();
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c0a3caf753550344eafee06078800c9a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dba2e994350d1f14cb2e667e48dee952
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,40 @@
using UnityEngine;
namespace Febucci.UI.Examples
{
[AddComponentMenu("")]
public class DefaultEffectsExample : MonoBehaviour
{
public TextAnimatorPlayer textAnimatorPlayer;
private void Awake()
{
UnityEngine.Assertions.Assert.IsNotNull(textAnimatorPlayer, $"Text Animator Player component is null in {gameObject.name}");
}
private void Start()
{
const char quote = '"';
//builds the text with all the default tags
string builtText = "<b>You can add effects by using <color=red>rich text tags</color>.</b>" +
$"\nExample: writing {quote}<noparse><shake>I'm cold</shake></noparse>{quote} will result in {quote}<shake>I'm cold</shake>{quote}." +
$"\n\n Effects that animate through time are called {quote}<color=red>Behaviors</color>{quote}, and the default tags are: ";
for (int i = 0; i < TAnimTags.defaultBehaviors.Length; i++)
{
builtText += EffectsTesting.AddEffect(TAnimTags.defaultBehaviors[i]);
}
builtText += $"\n\n<b>Effects that animate letters while they appear on screen are called {quote}<color=red>Appearances</color>{quote} and the default tags are</b>: ";
for (int i = 0; i < TAnimTags.defaultAppearances.Length; i++)
{
builtText += EffectsTesting.AddAppearanceEffect(TAnimTags.defaultAppearances[i]);
}
//shows the text dynamically (typewriter like)
textAnimatorPlayer.ShowText(builtText);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7a9712bddb3838449a1575c52d7d946a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,57 @@
using Febucci.UI.Core;
using System;
using UnityEngine;
namespace Febucci.UI.Examples
{
[AddComponentMenu("")]
public class EffectsTesting : MonoBehaviour
{
public TextAnimatorPlayer textAnimatorPlayer;
private void Awake()
{
UnityEngine.Assertions.Assert.IsNotNull(textAnimatorPlayer, $"Text Animator Player component is null in {gameObject.name}");
TAnimBuilder.InitializeGlobalDatabase();
}
private void Start()
{
ShowText();
}
public static string AddEffect(string tag)
{
return $"<{tag}><noparse><{tag}></noparse></{tag}>, ";
}
public static string AddAppearanceEffect(string tag)
{
return "{" + tag + "}" + "<noparse>{" + tag +"}</noparse>{/" + tag + "}, "; //todo optimize
}
public void ShowText()
{
string builtText = "Detected Behavior effects:\n";
string[] behaviors = TAnimBuilder.GetAllBehaviorsTags();
string[] appearances = TAnimBuilder.GetAllApppearancesTags();
for (int i = 0; i < behaviors.Length; i++)
{
builtText += AddEffect(behaviors[i]);
}
builtText += "\n\nDetected Appearance effects:\n";
for (int i = 0; i < appearances.Length; i++)
{
builtText += AddAppearanceEffect(appearances[i]);
}
textAnimatorPlayer.ShowText(builtText);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bd97cce66d5c4134f91adb299076439e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,39 @@
using UnityEngine;
namespace Febucci.UI.Examples
{
//Prevents this example to show up in the inspector
[AddComponentMenu("")]
public class EventExample : MonoBehaviour
{
public TextAnimatorPlayer textAnimatorPlayer;
public Camera cam;
int lastBGIndex;
public Color[] bgColors;
private void Awake()
{
UnityEngine.Assertions.Assert.IsNotNull(textAnimatorPlayer, $"Text Animator Player component is null in {gameObject.name}");
textAnimatorPlayer.textAnimator.onEvent += OnEvent;
}
void OnEvent(string message)
{
switch (message)
{
case "bg":
cam.backgroundColor = bgColors[lastBGIndex];
lastBGIndex++;
if (lastBGIndex >= bgColors.Length)
{
lastBGIndex = 0;
}
break;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: baebb1e78639e2f4797c062f1cee0e78
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
{
"name": "Febucci.TextAnimator.Demo.Runtime",
"references": [
"Unity.TextMeshPro",
"Febucci.TextAnimator.Runtime"
],
"optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b5c827fa52e382c45a066c5ff085b512
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,40 @@
using UnityEngine;
namespace Febucci.UI.Examples
{
/// <summary>
/// Starts the textAnimator once this object is active
/// Disables it once it's deactivated
/// </summary>
[AddComponentMenu("Febucci/TextAnimator/Utilities/SetTextOnEnable")]
public class SetTextOnEnable : MonoBehaviour
{
public TextAnimatorPlayer tanimPlayer;
string textToSet;
private void Awake()
{
UnityEngine.Assertions.Assert.IsNotNull("TextAnimator: The object 'SetTextOnEnable' has no TextAnimatorPlayer component reference.");
textToSet = tanimPlayer.textAnimator.tmproText.text;
tanimPlayer.ShowText("");
}
private void OnEnable()
{
tanimPlayer.ShowText(textToSet);
}
private void OnDisable()
{
if (tanimPlayer != null)
{
//Forces the text to hide
tanimPlayer.StopShowingText();
tanimPlayer.ShowText("");
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: de531fb300ad82643ad9acba37337850
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
using UnityEngine;
namespace Febucci.UI.Examples
{
//Prevents this example to show up in the inspector, since it should be used only in the example scene (and so, not annoy you after you understand how this works)
[AddComponentMenu("")]
public class UsageExample : MonoBehaviour
{
public TextAnimatorPlayer textAnimatorPlayer;
[TextArea(3, 50), SerializeField]
string textToShow = " ";
private void Awake()
{
UnityEngine.Assertions.Assert.IsNotNull(textAnimatorPlayer, $"Text Animator Player component is null in {gameObject.name}");
}
private void Start()
{
ShowText();
}
public void ShowText()
{
textAnimatorPlayer.ShowText(textToShow);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 65cd2c622bcc2df47813a20bb2263361
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: